Rewritten to use eval() (slow)
authorRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2009 21:48:49 +0000 (21:48 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2009 21:48:49 +0000 (21:48 +0000)
inc/classes/main/helper/class_BaseHelper.php

index 7b91d85..65654bd 100644 (file)
@@ -440,8 +440,13 @@ class BaseHelper extends BaseFrameworkSystem {
         * @return      $fieldValue             Value from field
         */
        public function getValueField ($fieldName) {
+               // Construct the eval() command
+               $eval = sprintf("\$fieldValue = \$this->valueInstance->getField('%s');",
+                       $fieldName
+               );
+
                // Get the field value
-               $fieldValue = call_user_func($this->valueInstance->__toString() . '::getField', array($fieldName));
+               eval($eval);
 
                // Return it
                return $fieldValue;