Do not try to create non existing classes

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-07-13 09:47:09 +02:00
parent ff88cdbed2
commit 7f7a8ac467

View File

@ -31,7 +31,9 @@ function PMA_getPlugin(
$file = $class_name . ".class.php";
if (is_file($plugins_dir . $file)) {
include_once $plugins_dir . $file;
return new $class_name;
if (class_exists($class_name)) {
return new $class_name;
}
}
return null;