Skip to content

Commit 7681a97

Browse files
committed
fix warning and error in cronjob
1 parent 246321a commit 7681a97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cronjobs/opencast_discover_videos.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function execute($last_result, $parameters = array())
9191
$offset += $limit;
9292

9393
// load events from opencast and filter the processed ones
94-
foreach ($oc_events as $event) {
94+
if (!empty($oc_events)) foreach ($oc_events as $event) {
9595
$current_event = null;
9696

9797
// only add videos / reinspect videos if they are readily processed
@@ -174,7 +174,7 @@ public function execute($last_result, $parameters = array())
174174
$plvideo->store();
175175
}
176176
}
177-
} while (sizeof($oc_events) > 0);
177+
} while (!empty($oc_events));
178178

179179
// Check if local videos are no longer available in OC
180180
foreach (array_diff($local_event_ids, $event_ids) as $event_id) {

0 commit comments

Comments
 (0)