-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hi. I'm having trouble with adding the draft-04 meta schema to the schema store.
<?php
$store = new SchemaStore();
$url = "http://json-schema.org/draft-04/schema#";
$schema = json_decode(file_get_contents($url));
$store->add($url, $schema);
?>This will result in the following error:
PHP Fatal error: Maximum function nesting level of '100' reached, aborting! in /Users/jans/jsv4-php/schema-store.php on line 45
PHP Stack trace:
PHP 1. {main}() /Users/jans/jsv4-php/test.php:0
PHP 2. runTests() /Users/jans/jsv4-php/test.php:111
PHP 3. runTests() /Users/jans/jsv4-php/test.php:106
PHP 4. runPhpTest() /Users/jans/jsv4-php/test.php:74
PHP 5. include_once() /Users/jans/jsv4-php/test.php:52
PHP 6. SchemaStore->add() /Users/jans/jsv4-php/tests/03 - schema store/04 - addmetaschema.php:8
PHP 7. SchemaStore->get() /Users/jans/jsv4-php/schema-store.php:132
PHP 8. SchemaStore->add() /Users/jans/jsv4-php/schema-store.php:188
PHP 9. SchemaStore->get() /Users/jans/jsv4-php/schema-store.php:132
PHP 10. SchemaStore->add() /Users/jans/jsv4-php/schema-store.php:188
PHP 11. SchemaStore->get() /Users/jans/jsv4-php/schema-store.php:132
PHP 12. SchemaStore->add() /Users/jans/jsv4-php/schema-store.php:188
PHP 13. SchemaStore->normalizeSchema() /Users/jans/jsv4-php/schema-store.php:125
PHP 14. SchemaStore->normalizeSchema() /Users/jans/jsv4-php/schema-store.php:167
PHP 15. SchemaStore->normalizeSchema() /Users/jans/jsv4-php/schema-store.php:167
PHP 16. SchemaStore->normalizeSchema() /Users/jans/jsv4-php/schema-store.php:167
PHP 17. SchemaStore->normalizeSchema() /Users/jans/jsv4-php/schema-store.php:167
[...]
PHP 98. SchemaStore->normalizeSchema() /Users/jans/jsv4-php/schema-store.php:167
PHP 99. SchemaStore::resolveUrl() /Users/jans/jsv4-php/schema-store.php:159
I'm using following PHP version:
PHP 5.4.32 (cli) (built: Sep 4 2014 08:29:44)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
Did I misunderstand how adding schemas to the schema store works? Thanks in advance for your help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels