Closed as not planned
Description
When an empty array is given to \JsonSchema\Constraints\BaseConstraint::arrayToObjectRecursive()
, it is returned identical. This leads to issues later on when using a SchemaStorage
to contain this schema. Such an empty schema is only really used for tests, but this currently requires workarounds.
The following example code
use \JsonSchema\Validator;
print_r(Validator::arrayToObjectRecursive([ "baz" => [ "bar" => "baz" ] ]));
print_r(Validator::arrayToObjectRecursive([]));
results in
stdClass Object
(
[baz] => stdClass Object
(
[bar] => baz
)
)
Array
(
)
Metadata
Metadata
Assignees
Labels
No labels