fix phpstan
This commit is contained in:
parent
c7eb63f41f
commit
b4bf92018e
3 changed files with 4 additions and 16 deletions
|
|
@ -17394,18 +17394,6 @@ parameters:
|
|||
count: 4
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$MemoryLimit in empty\(\) always exists and is always falsy\.$#'
|
||||
identifier: empty.variable
|
||||
count: 1
|
||||
path: ../../htdocs/cron/class/cronjob.class.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always true\.$#'
|
||||
identifier: ternary.alwaysTrue
|
||||
|
|
|
|||
|
|
@ -351,8 +351,8 @@ if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
|
|||
$tooltiponprice .= '<br>';
|
||||
$tooltiponpricemultiprice .= '<br>';
|
||||
if (!empty($line->special_code)) {
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialcode($line->special_code);
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialcode($line->special_code);
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
|
||||
$tooltiponpricemultiprice .= '<br>'.$langs->trans("SpecialLine").' : '.getLabelSpecialCode($line->special_code);
|
||||
}
|
||||
if ($line->product_type == 9) {
|
||||
$tooltiponprice .= '<br>'.$langs->trans("SpecialLine").' : '.$langs->trans("GroupingLine");
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,7 @@ class Cronjob extends CommonObject
|
|||
dol_syslog(get_class($this)."::run_jobs jobtype=".$this->jobtype." userlogin=".$userlogin, LOG_DEBUG);
|
||||
|
||||
// Increase limit of time. Works only if we are not in safe mode
|
||||
$ExecTimeLimit = 600;
|
||||
$ExecTimeLimit = getDolGlobalInt('MAIN_CRON_EXEC_TIME_LIMIT', 600);
|
||||
if (!empty($ExecTimeLimit)) {
|
||||
$err = error_reporting();
|
||||
error_reporting(0); // Disable all errors
|
||||
|
|
@ -1231,7 +1231,7 @@ class Cronjob extends CommonObject
|
|||
@set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64
|
||||
error_reporting($err);
|
||||
}
|
||||
$MemoryLimit = 0;
|
||||
$MemoryLimit = getDolGlobalString('MAIN_CRON_EXEC_TIME_LIMIT');
|
||||
if (!empty($MemoryLimit)) {
|
||||
@ini_set('memory_limit', $MemoryLimit);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue