Tiny change. If we came here, it means that there is an error... But, at least make sure the script doesn't run into a Fatal Error.

This commit is contained in:
alessandro.segala 2009-06-20 13:23:21 +00:00
parent 63363edcc6
commit 1b2e068757

View File

@ -141,8 +141,11 @@ while(true)
// If all 3 attempts failed... // If all 3 attempts failed...
if($i == 3) if($i == 3)
{ {
$process->kill(); if($process)
$process = false; {
$process->kill();
$process = false;
}
error_log(date('Y-m-d H:i')." - Cannot send message:\n".$message."\nTo device: ".$deviceToken."\n\n", 3, 'PushErrors.log'); error_log(date('Y-m-d H:i')." - Cannot send message:\n".$message."\nTo device: ".$deviceToken."\n\n", 3, 'PushErrors.log');
} }
} }