Permalink
Browse files

Reset $run in the scheduler loop. Check if the method check method ex…

…ists.
  • Loading branch information...
1 parent 2f95d43 commit 0f9b61edf6cda60049045c5ece8532c445885083 @evansims evansims committed Aug 17, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 application/controllers/scheduler.php
@@ -90,14 +90,20 @@ public function index()
if ($scheduler_controller AND (!($scheduler_last > $cronRan) OR $scheduler_last == 0))
{
+ $run = FALSE;
+
// Catch errors from missing scheduler or other bugs
try {
$dispatch = Dispatch::controller($scheduler_controller, "scheduler/");
- if ($dispatch instanceof Dispatch) $run = $dispatch->method('index', '');
+
+ if ($dispatch instanceof Dispatch && method_exists($dispatch,'method'))
+ {
+ $run = $dispatch->method('index', '');
+ }
}
catch (Exception $e)
{
- $run = FALSE;
+ // Nada.
}
if ($run !== FALSE)

0 comments on commit 0f9b61e

Please sign in to comment.