Verified Commit 99bed756 authored by Andrei Mondoc's avatar Andrei Mondoc Committed by Kevin Cristiano

ensure namespace is an exact match

Signed-off-by: Kevin Cristiano's avatarKevin Cristiano <kcristiano@kcristiano.com>
parent 1fc2ee23
......@@ -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 ) ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment