Changed call_user_func to call_user_func_array in t3lib_div to allow passing paramete...
authorWolfgang Klinger <wolfgang@stufenlos.net>
Sun, 3 Sep 2006 09:43:38 +0000 (09:43 +0000)
committerWolfgang Klinger <wolfgang@stufenlos.net>
Sun, 3 Sep 2006 09:43:38 +0000 (09:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1718 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 8268628..87d39e1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2006-09-03  Wolfgang Klinger <wk@plan2.net>
+
+       * Changed call_user_func to call_user_func_array in t3lib_div to allow passing parameters by reference to t3lib_div::callUserFunction
 
 2006-09-02  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index 9c403c5..7d6ae7c 100755 (executable)
@@ -3830,11 +3830,10 @@ class t3lib_div {
 
                        // Check persistent object and if found, call directly and exit.
                if (is_array($GLOBALS['T3_VAR']['callUserFunction'][$funcName]))        {
-                       return call_user_func(
+                       return call_user_func_array(
                                                array(&$GLOBALS['T3_VAR']['callUserFunction'][$funcName]['obj'],
                                                        $GLOBALS['T3_VAR']['callUserFunction'][$funcName]['method']),
-                                               $params,
-                                               $ref
+                                               array(&$params, &$ref)
                                        );
                }
 
@@ -3891,10 +3890,9 @@ class t3lib_div {
                                                );
                                        }
                                                // Call method:
-                                       $content = call_user_func(
+                                       $content = call_user_func_array(
                                                array(&$classObj, $parts[1]),
-                                               $params,
-                                               $ref
+                                               array(&$params, &$ref)
                                        );
                                } else {
                                        if (!$silent)   debug("<strong>ERROR:</strong> No method name '".$parts[1]."' in class ".$parts[0],1);
@@ -3904,7 +3902,7 @@ class t3lib_div {
                        }
                } else {        // Function
                        if (function_exists($funcRef))  {
-                               $content = call_user_func($funcRef, $params, $ref);
+                               $content = call_user_func_array($funcRef, array(&$params, &$ref));
                        } else {
                                if (!$silent)   debug("<strong>ERROR:</strong> No function named: ".$funcRef,1);
                        }