e107_handlers/cron_class.php
Avoid too many return
statements within this method. Open
Open
return $status;
Argument 1 (string)
is null
but \strlen()
takes string
Open
Open
$lastDue = $this->year.'-'.(strlen($this->month) === 1 ? '0'.$this->month : $this->month).'-'.(strlen($this->day) === 1 ? '0'.$this->day : $this->day).'T'.(strlen($this->hour) === 1 ? '0'.$this->hour : $this->hour) . ":" . (strlen($this->minute) === 1 ? '0'.$this->minute : $this->minute);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$lastDue = $this->year.'-'.(strlen($this->month) === 1 ? '0'.$this->month : $this->month).'-'.(strlen($this->day) === 1 ? '0'.$this->day : $this->day).'T'.(strlen($this->hour) === 1 ? '0'.$this->hour : $this->hour) . ":" . (strlen($this->minute) === 1 ? '0'.$this->minute : $this->minute);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$this->debug("Days array matching weekdays for $year-$month");
- Exclude checks
Call with 2 arg(s) to \CronParser::debug()
which only takes 1 arg(s) defined at /code/e107_handlers/cron_class.php:464
Open
Open
$this->cron->debug('e107: Cron is running: '.print_r($job,true), E_NOTICE);
- Exclude checks
Argument 4 (mon)
is null
but \mktime()
takes int
Open
Open
$this->lastRan = mktime($this->hour, $this->minute, 0, $this->month, $this->day, $this->year);
- Exclude checks
Argument 4 (mon)
is null
but \mktime()
takes int
Open
Open
$wkday = date('w', mktime(0, 0, 0, $month, $day, $year));
- Exclude checks
Argument 1 (hour)
is null
but \mktime()
takes int
Open
Open
$this->lastRan = mktime($this->hour, $this->minute, 0, $this->month, $this->day, $this->year);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$this->debug("Have to go for previous year " . $this->year);
- Exclude checks
Call with 2 arg(s) to \CronParser::debug()
which only takes 1 arg(s) defined at /code/e107_handlers/cron_class.php:464
Open
Open
$this->cron->debug('e107: Cron file not readable: '.e_PLUGIN . $job['path'] . "/e_cron.php", E_ERROR);
- Exclude checks
Call with 2 arg(s) to \CronParser::debug()
which only takes 1 arg(s) defined at /code/e107_handlers/cron_class.php:464
Open
Open
$this->cron->debug('e107: Cron could not find class: '.$class, E_ERROR);
- Exclude checks
Argument 2 (min)
is null
but \mktime()
takes int
Open
Open
$this->lastRan = mktime($this->hour, $this->minute, 0, $this->month, $this->day, $this->year);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$this->debug("Getting the last day for previous month: " . $this->year . '-' . $this->month);
- Exclude checks
Returning type null
but run()
is declared to return bool
Open
Open
return null;
- Exclude checks
Argument 2 (type)
is 'theme'
but \e_file::gitPull()
takes null
defined at /code/e107_handlers/file_class.php:1591
Open
Open
$return = $fl->gitPull($theme, 'theme');
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$this->debug("Cron was due before this month. Previous month is: " . $this->year . '-' . $this->month);
- Exclude checks
Variable $arWeekdays
was undeclared, but array fields are being added to it. Open
Open
$arWeekdays[] = $i;
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$this->debug("Number of days in $year-$month : $daysinmonth");
- Exclude checks
Argument 6 (year)
is null
but \mktime()
takes int
Open
Open
$this->lastRan = mktime($this->hour, $this->minute, 0, $this->month, $this->day, $this->year);
- Exclude checks
Variable $tmp
was undeclared, but array fields are being added to it. Open
Open
$tmp[] = 0;
- Exclude checks
Argument 4 (mon)
is null
but \mktime()
takes int
Open
Open
return date('t', mktime(0, 0, 0, $month, 1, $year));
- Exclude checks
Assigning float|int
to property but \CronParser->year
is null
Open
Open
$this->year = $this->year - 1;
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$this->debug("Cron was due on " . $this->day . " of this month");
- Exclude checks
Argument 5 (day)
is null
but \mktime()
takes int
Open
Open
$this->lastRan = mktime($this->hour, $this->minute, 0, $this->month, $this->day, $this->year);
- Exclude checks
Assigning float|int
to property but \CronParser->year
is null
Open
Open
$this->year = $this->year -1;
- Exclude checks
Assigning string
to property but \CronParser->year
is null
Open
Open
$this->year = $this->now[5];
- Exclude checks
Invalid operator: left operand of -
is null
(expected number) Open
Open
$this->year = $this->year - 1;
- Exclude checks
Call with 2 arg(s) to \CronParser::debug()
which only takes 1 arg(s) defined at /code/e107_handlers/cron_class.php:464
Open
Open
$this->cron->debug('Cron could not find method: '.$job['function'], E_ERROR);
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
Open
$this->debug("Not due within this year. So checking the previous year " . $this->year);
- Exclude checks
Invalid operator: left operand of -
is null
(expected number) Open
Open
$this->year = $this->year -1;
- Exclude checks