Skip to content

Commit

Permalink
CRON call ends in null exception
Browse files Browse the repository at this point in the history
[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/"
  • Loading branch information
Oliver Kohl D.Sc. committed Jul 24, 2014
1 parent e2327f8 commit 97e61f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ function handleUnexpectedShutdown() {
// 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();
}
}
Expand Down

0 comments on commit 97e61f4

Please sign in to comment.