New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with serialization SoapFault #1431
Comments
I have the same problem |
I was having the same problem but then as soon as I started trying to fix it my soap resource fixed itself and I couldn't dig in. I think the description of the problem with the assumptions in using reset are accurate though. I was going to play with refactoring the if/ternary logic out and letting var_export or print_r just dump what ever was given. Replacing it with something like: if (isset($e->detail)) {
if (is_string($e->detail)) {
$str .= ' detail: ' . $e->detail;
}
elseif (is_object($e->detail) || is_array($e->detail)) {
$str .= ' detail: ' . var_export($e->detail, true);
}
} |
The problem here is that php claims detail property as string (you can look at the __construct method https://www.php.net/manual/en/class.soapfault.php ), but in fact it's not only string. So if it mixed property we have to use some kind of serialization, var_export looks nice. I use json_encode as ad-hoc solution, I think it is more friendly for logging systems. |
Refs #1391 |
Fixed by #1462 |
Monolog version: 2.0.2
Occurs an error during serialization
SoapFault
, when propertydetails
has value of complex type.An example of SoapFault:
Commit 633bcd5 not fixes issue in this case, because
reset()
returnsstdClass{requestId, errorCode, errorDetail}
.The text was updated successfully, but these errors were encountered: