From 9147a10cc7810d247b485fe4bfb49623f521cd1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Szab=C3=B3?= Date: Tue, 5 Sep 2017 21:57:17 +0200 Subject: [PATCH] Add try to load alphanumeric class (#1630) --- system/src/Grav/Common/GPM/Installer.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/src/Grav/Common/GPM/Installer.php b/system/src/Grav/Common/GPM/Installer.php index 770e7c8c24..eadc6501a7 100644 --- a/system/src/Grav/Common/GPM/Installer.php +++ b/system/src/Grav/Common/GPM/Installer.php @@ -238,6 +238,12 @@ private static function loadInstaller($installer_file_folder, $is_install) return $class_name; } + $class_name_alphanumeric = preg_replace('/[^a-zA-Z0-9]+/', '', $class_name); + + if (class_exists($class_name_alphanumeric)) { + return $class_name_alphanumeric; + } + return $installer; }