Fixes "Trying to get property 'status' of non-object"
authorMichael <heluecht@pirati.ca>
Wed, 26 Dec 2018 11:04:29 +0000 (11:04 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 26 Dec 2018 11:04:29 +0000 (11:04 +0000)
jappixmini/jappixmini.php

index 0ef56ae..28e238d 100644 (file)
@@ -666,7 +666,7 @@ function jappixmini_cron(App $a, $d)
 
                                // parse answer
                                $answer = json_decode($answer_json);
-                               if ($answer->status != "ok") {
+                               if (empty($answer->status) || ($answer->status != "ok")) {
                                        throw new Exception();
                                }