autoloader: check if class name is namespaced before trying to split it

master
Andrew Dolgov 6 years ago
parent 331ded21ba
commit a2d1fa5b14

@ -2,6 +2,10 @@
require_once "functions.php";
spl_autoload_register(function($class) {
$namespace = '';
$class_name = $class;
if (strpos($class, '\\') !== FALSE)
list ($namespace, $class_name) = explode('\\', $class, 2);
$root_dir = dirname(__DIR__); // we're in tt-rss/include

Loading…
Cancel
Save