BUG 8284 Add validation if the class of the plugin doesnt exists

This commit is contained in:
Julio Cesar Laura
2012-01-12 18:20:09 -04:00
parent 5e5e3c9d0f
commit 705e2c1b8b

View File

@@ -965,13 +965,13 @@ class PMPluginRegistry {
}
$sFilename = PATH_PLUGINS . $aux[ count($aux) -1];
if (! file_exists($sFilename) ) continue;
require_once( $sFilename);
$oPlugin = new $detail->sClassName( $detail->sNamespace, $detail->sFilename );
$this->_aPlugins[$detail->sNamespace] =& $oPlugin;
$iPlugins++;
//print ( "$iPlugins $namespace <br>");
$oPlugin->setup();
require_once $sFilename;
if (class_exists($detail->sClassName)) {
$oPlugin = new $detail->sClassName( $detail->sNamespace, $detail->sFilename );
$this->_aPlugins[$detail->sNamespace] =& $oPlugin;
$iPlugins++;
$oPlugin->setup();
}
}
}
}