Skip to content

Commit e8b7614

Browse files
sanmaierayd
authored andcommitted
Update validate-json to use spl_autoload_register (#589)
Fixes #574
1 parent dcb6e10 commit e8b7614

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/validate-json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @return void
1515
*/
16-
function __autoload($className)
16+
spl_autoload_register(function ($className)
1717
{
1818
$className = ltrim($className, '\\');
1919
$fileName = '';
@@ -26,7 +26,7 @@ function __autoload($className)
2626
if (stream_resolve_include_path($fileName)) {
2727
require_once $fileName;
2828
}
29-
}
29+
});
3030

3131
// support running this tool from git checkout
3232
if (is_dir(__DIR__ . '/../src/JsonSchema')) {

0 commit comments

Comments
 (0)