Answer the question
In order to leave comments, you need to log in
Why does the system react strangely to an object received from json?
Good afternoon.
1. I get Trying to get property of non-object when I try to compare
2. I output before that
The system proudly displaysif( $resultJson->Success === false ) {...}
print_r($resultJson);die();
stdClass Object ( [ErrorCode] => [ErrorMessage] => [Success] => true )
print_r($resultJson->Success);die();
true
$temp = $resultJson->Success;
print_r($temp);die();
if( $temp === false ) {
Answer the question
In order to leave comments, you need to log in
Telepathy: All this code in a loop. The first element of the loop is good, so die is good. If die is removed, then the first element passes, and the second is null, so it falls.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question