X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fextended%2Fclass_SerializationContainer.php;h=6d5c15de54fd078d2bf1014929174a0fc5ae1a97;hp=54a4acb13c7d56f308d57d274df4e171ae5e5235;hb=65d72098d3ec6a0ef7782668264fc6f33f9ebeb6;hpb=b44e5e7347f9a1dbd49b5b47d506a4f6526caf2f diff --git a/inc/classes/main/extended/class_SerializationContainer.php b/inc/classes/main/extended/class_SerializationContainer.php index 54a4acb..6d5c15d 100644 --- a/inc/classes/main/extended/class_SerializationContainer.php +++ b/inc/classes/main/extended/class_SerializationContainer.php @@ -55,19 +55,8 @@ class SerializationContainer extends FrameworkArrayObject { // Is the required method available? if (method_exists($object, sprintf("get%s", $curr))) { - // Generate a command for getting it - $eval = sprintf("\$value = \$object->get%s();", - $curr - ); - - // Debug eval command - if (defined('DEBUG_EVAL')) $limitInstance->getDebugInstance()->output(sprintf("[%s:] Constructed PHP command:
%s

\n", - $this->__toString(), - htmlentities($eval) - )); - - // Run it - eval($eval); + // Generate call-back function + $value = call_user_func_array(array($object, sprintf("get%s", $curr))); // Add this item to the container list $containerInstance->append(array(