I am using a class from somebody else and are getting an unexpected result. I already have an idea how to work around it, but I would like to understand why this happens.
class Pay {
public function checkStatus {
$check[0] = "000000 OK"
return $check[0]
}
}
$status = $cart->checkStatus ();
$payed = ( $status == "000000 OK" ? true : false);
The problem is that $status is somehow 1 when printing (could be also 'true' (have to check later at home)). Also payed is set to 'true' while I expect 'false' because of the wrong value of $status. Hope somebody can explain to me what is happening.