Skip to content

Commit

Permalink
Fix return type of spl_autoload_register's callable (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed May 15, 2023
1 parent 850f4b4 commit f41f88f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Highlight/Autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Autoloader
*
* @param string $class a name of a Scrivo class
*
* @return bool true if the source file was successfully included
* @return void
*/
public static function load($class)
{
Expand All @@ -66,8 +66,6 @@ public static function load($class)
}

$c = str_replace("\\", "/", substr($class, 10)) . ".php";
$res = include __DIR__ . "/$c";

return $res == 1 ? true : false;
include __DIR__ . "/$c";
}
}

0 comments on commit f41f88f

Please sign in to comment.