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

ensure namespace is an exact match

parent 046a72fc
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