Skip to content

Commit

Permalink
Add try to load alphanumeric class (#1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-szabo97 authored and rhukster committed Sep 5, 2017
1 parent 0179c6e commit 9147a10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions system/src/Grav/Common/GPM/Installer.php
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9147a10

Please sign in to comment.