You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For properties that are supposed to be objects, if the user passes a scalar, the array_key_exists method in BaseNode::walk() raises a type error instead of an invalid input exception.
Sample code:
class Handler extends InputHandler
{
public function define()
{
$this->add('endpoint', Endpoint::class, [
'required' => true,
'handler' => new EndPointHandler(),
'instantiator' => new EndPointInstantiator(),
]);
}
}
Sample input:
{
"endpoint": "https://local.liniopay.com",
}
Actual error raised:
{
"exception_class":"TypeError",
"exception_message":"array_key_exists() expects parameter 2 to be array, string given",
"exception_code":0,"exception_file":"/vagrant/vendor/linio/input/src/Node/BaseNode.php",
"exception_line":214
}
The text was updated successfully, but these errors were encountered:
Most nodes relied on the dynamic features of PHP to do a little magic. Since we're getting stricter and stricter since 7.0, we do have to review and adapt some assumptions we made in the past.
For properties that are supposed to be objects, if the user passes a scalar, the
array_key_exists
method in BaseNode::walk() raises a type error instead of an invalid input exception.Sample code:
Sample input:
Actual error raised:
The text was updated successfully, but these errors were encountered: