Skip to content
Snippets Groups Projects
Verified Commit eb5ee228 authored by Andrei Mondoc's avatar Andrei Mondoc Committed by Kevin Cristiano
Browse files

ensure namespace is an exact match

parent f1cd563b
No related branches found
No related tags found
No related merge requests found
......@@ -93,10 +93,10 @@ class Autoloader {
*/
private function autoload( $class_name ) {
if ( false === strpos( $class_name, $this->namespace ) ) return;
$parts = explode( '\\', $class_name );
if ( $this->namespace !== $parts[0] ) return;
// remove namespace and join class path
$class_path = str_replace( '_', '-', implode( DIRECTORY_SEPARATOR, array_slice( $parts, 1 ) ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment