Skip to content

Commit 77006ae

Browse files
committed
avoid problems when indexer is called without ID
1 parent fd26867 commit 77006ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

action.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ function qccron(&$event, $param) {
5151
if ($this->run) return;
5252

5353
global $ID;
54+
if(!$ID) return;
55+
5456
$this->run = true;
5557
echo 'qc data gatherer: started on '.$ID.NL;
5658
$qc = $this->loadHelper('qc',true);
@@ -83,6 +85,6 @@ function qccron(&$event, $param) {
8385
* @return true when everything is alright
8486
*/
8587
function isOk($arr) {
86-
return count(array_filter($arr)) == 0;
88+
return count(array_filter((array) $arr)) == 0;
8789
}
8890
}

0 commit comments

Comments
 (0)