]> source.dussan.org Git - nextcloud-server.git/commitdiff
CRON call ends in null exception
authorOliver Kohl D.Sc. <oliver@kohl.bz>
Thu, 24 Jul 2014 11:46:40 +0000 (13:46 +0200)
committerOliver Kohl D.Sc. <oliver@kohl.bz>
Thu, 24 Jul 2014 11:46:40 +0000 (13:46 +0200)
[error] 4461#0: *186285 FastCGI sent in stderr: "PHP message
: PHP Fatal error:  Call to a member function execute() on null in /var/www/ownc
loud/cron.php on line 125" while reading response header from upstream, client:
217.13.183.252, server: cloud.mycloud.com, request: "GET /cron.php HTTP/1.1", upstre
am: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "cloud.mycloud.com", referrer: "
https://cloud.mycloud.com/"

cron.php

index 4c86407b9442fbcb68d1c0f2690f9019495af815..ba17c89989478540e16fc665398394ddbc6d501e 100644 (file)
--- a/cron.php
+++ b/cron.php
@@ -122,8 +122,11 @@ try {
                        // Work and success :-)
                        $jobList = \OC::$server->getJobList();
                        $job = $jobList->getNext();
-                       $job->execute($jobList, $logger);
-                       $jobList->setLastJob($job);
+                       if ($job != null)
+                       {
+                               $job->execute($jobList, $logger);
+                               $jobList->setLastJob($job);
+                       }
                        OC_JSON::success();
                }
        }