Skip to content

Commit

Permalink
fixing error where php version is <= 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranmasterton committed Apr 18, 2011
1 parent 3b35895 commit b379b1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/WpAdmin.php
Expand Up @@ -72,15 +72,15 @@ public static function exec($args)
// Decide how to call the class / method.
switch($method){
case 'add':
eval("\$object = \$class::add(self::\$_params);");
eval("\$object = " . $class . "::add(self::\$_params);");
break;
case 'list':
eval("\$object = \$class::listAll(self::\$_params);");
eval("\$object = " . $class . "::listAll(self::\$_params);");
break;
default:
// Does the class and method requested exist?
if(method_exists($class, $method)){
eval("$object = \$class::load(self::\$_params['primary']);");
eval("$object = " . $class . "::load(self::\$_params['primary']);");
$object->$method(self::$_params);
}else{
// Else class / method not found, display help.
Expand Down

0 comments on commit b379b1a

Please sign in to comment.