Skip to content

Commit

Permalink
Update validate-json to use spl_autoload_register (#589)
Browse files Browse the repository at this point in the history
Fixes #574
  • Loading branch information
sanmai authored and erayd committed Sep 23, 2019
1 parent dcb6e10 commit e8b7614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/validate-json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @return void
*/
function __autoload($className)
spl_autoload_register(function ($className)
{
$className = ltrim($className, '\\');
$fileName = '';
Expand All @@ -26,7 +26,7 @@ function __autoload($className)
if (stream_resolve_include_path($fileName)) {
require_once $fileName;
}
}
});

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

0 comments on commit e8b7614

Please sign in to comment.