Skip to content

Commit

Permalink
Merge pull request #97 from mleiv/master
Browse files Browse the repository at this point in the history
#96 - autoloader check class exists in array
  • Loading branch information
alanseiden authored Sep 1, 2016
2 parents 7e2f161 + 5a5fdf5 commit 57da8db
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ToolkitApi/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@
'ToolkitApi\UInt16Param' => __DIR__ . DIRECTORY_SEPARATOR . 'UInt16Param.php',
);

$file = $classmap[$class];
if (file_exists($file)) {
require_once $file;
if (array_key_exists($class, $classmap)) {
$file = $classmap[$class];
if (file_exists($file)) {
require_once $file;
}
}

return;
Expand Down

0 comments on commit 57da8db

Please sign in to comment.