View Issue Details

IDProjectCategoryView StatusLast Update
0016761phpList 3 applicationPlugin APIpublic27-03-13 12:02
Reporterduncanc Assigned To 
Status resolvedResolutionfixed 
Product VersionSVN 
Target Version2.11.8Fixed in Version2.11.8 
Summary0016761: Remove use of eval()
DescriptionUsing SVN trunk

In file pluginlib.php line 59
        eval("\$pluginInstance = new ". $className ."();");

The eval is unnecessary as php allows a variable class name, and can be replaced by:
        $pluginInstance = new $className();
TagsNo tags attached.



26-03-13 14:48

administrator   ~0051989

I think there was a reason I did it like that, but I can't remember. :-)


27-03-13 09:40

updater   ~0051993

Possibly to trap an error when creating the plugin object, but I don't think that eval will do that.


27-03-13 12:02

administrator   ~0051995

yes, seems to work all fine without the eval.