Fixed bug #13874: NULL reference when using hook in class.t3lib_utility_client.php...
authorSteffen Kamper <info@sk-typo3.de>
Wed, 16 Jun 2010 22:25:40 +0000 (22:25 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 16 Jun 2010 22:25:40 +0000 (22:25 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7944 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/utility/class.t3lib_utility_client.php

index 96208d1..b0fea00 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
 
 2010-06-16  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #13874: NULL reference when using hook in class.t3lib_utility_client.php (Thanks to Steffen Mueller)
        * Fixed bug #14717: [Usability] Add delay to close the context menu
        * Fixed bug #14016: typo in class.t3lib_tcemain.php (Thanks to Vladimir Podkovanov)
 
index 973a20d..50b0714 100644 (file)
@@ -51,7 +51,10 @@ final class t3lib_utility_Client {
                                        'returnResult' => &$returnResult,
                                );
 
-                               $hookResult = t3lib_div::callUserFunction($hookFunction, $hookParameters, NULL);
+                                       // need reference for third parameter in t3lib_div::callUserFunction,
+                                       // so create a reference to NULL
+                               $null = NULL;
+                               $hookResult = t3lib_div::callUserFunction($hookFunction, $hookParameters, $null);
                                if ($returnResult && is_array($hookResult) && count($hookResult)) {
                                        return $hookResult;
                                }
@@ -155,7 +158,10 @@ final class t3lib_utility_Client {
                                        'returnResult' => &$returnResult,
                                );
 
-                               $hookResult = t3lib_div::callUserFunction($hookFunction, $hookParameters, NULL);
+                                       // need reference for third parameter in t3lib_div::callUserFunction,
+                                       // so create a reference to NULL
+                               $null = NULL;
+                               $hookResult = t3lib_div::callUserFunction($hookFunction, $hookParameters, $null);
                                if ($returnResult && is_string($hookResult) && !empty($hookResult)) {
                                        return $hookResult;
                                }