From e664c328d0ca3b08fa46baabb20471670d6c5a28 Mon Sep 17 00:00:00 2001 From: yura_nalivaiko Date: Mon, 13 Nov 2017 16:18:56 +0200 Subject: [PATCH] - fixed autoloader; --- includes/class-init.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/class-init.php b/includes/class-init.php index 322b7421..9e24a323 100644 --- a/includes/class-init.php +++ b/includes/class-init.php @@ -220,7 +220,7 @@ if ( ! class_exists( 'UM' ) ) { $path = implode( DIRECTORY_SEPARATOR, $array ); $path = str_replace( '_', '-', $path ); $full_path .= $path . '.php'; - } else { + } else if ( strpos( $class, 'um\\' ) === 0 ) { $class = implode( '\\', $array ); $slash = DIRECTORY_SEPARATOR; $path = str_replace( @@ -230,7 +230,9 @@ if ( ! class_exists( 'UM' ) ) { $full_path = um_path . 'includes' . $path . '.php'; } - include_once $full_path; + if( isset( $full_path ) && file_exists( $full_path ) ) { + include_once $full_path; + } } }