qual:phpstan

htdocs/cron/card.php	144	Property Cronjob::$frequency (int) does not accept array|string.
htdocs/cron/card.php	145	Property Cronjob::$maxrun (int) does not accept array|string.
htdocs/cron/card.php	163	Property CommonObject::$id (int) does not accept array|string.
htdocs/cron/card.php	179	Property Cronjob::$frequency (int) does not accept array|string.
htdocs/cron/card.php	180	Property Cronjob::$maxrun (int) does not accept array|string.
This commit is contained in:
thibdrev 2024-01-19 14:39:34 +01:00 committed by GitHub
parent 26cbf2e207
commit c4e246f662
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
// Load translation files required by the page
$langs->loadLangs(array('admin', 'cron', 'members', 'bills'));
$id = GETPOST('id', 'int');
$id = GETPOSTINT('id');
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
@ -141,8 +141,8 @@ if ($action == 'add' && $permissiontoadd) {
$object->priority = GETPOST('priority', 'int');
$object->datenextrun = dol_mktime(GETPOST('datenextrunhour', 'int'), GETPOST('datenextrunmin', 'int'), 0, GETPOST('datenextrunmonth', 'int'), GETPOST('datenextrunday', 'int'), GETPOST('datenextrunyear', 'int'));
$object->unitfrequency = GETPOST('unitfrequency', 'int');
$object->frequency = GETPOST('nbfrequency', 'int');
$object->maxrun = GETPOST('maxrun', 'int');
$object->frequency = GETPOSTINT('nbfrequency');
$object->maxrun = GETPOSTINT('maxrun');
$object->email_alert = GETPOST('email_alert');
// Add cron task
@ -176,8 +176,8 @@ if ($action == 'update' && $permissiontoadd) {
$object->priority = GETPOST('priority', 'int');
$object->datenextrun = dol_mktime(GETPOST('datenextrunhour', 'int'), GETPOST('datenextrunmin', 'int'), 0, GETPOST('datenextrunmonth', 'int'), GETPOST('datenextrunday', 'int'), GETPOST('datenextrunyear', 'int'));
$object->unitfrequency = GETPOST('unitfrequency', 'int');
$object->frequency = GETPOST('nbfrequency', 'int');
$object->maxrun = GETPOST('maxrun', 'int');
$object->frequency = GETPOSTINT('nbfrequency');
$object->maxrun = GETPOSTINT('maxrun');
$object->email_alert = GETPOST('email_alert');
// Add cron task