Fixed: hanging recordset in t3lib_BEfunc
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 23 Aug 2007 13:07:30 +0000 (13:07 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 23 Aug 2007 13:07:30 +0000 (13:07 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2458 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index 80dd864..cd60361 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-23 Dmitry Dulepov <dmitry@typo3.org>
+
+       * Fixed: hanging recordset in t3lib_BEfunc
+
 2007-08-23 Andreas Otto <andreas.otto@dkd.de>
 
        * (trivial) Fixed bug #4888:  Invalid argument supplied for foreach().
index 32d96f7..f9ce8d4 100755 (executable)
@@ -2774,7 +2774,7 @@ class t3lib_BEfunc        {
         */
        function exec_foreign_table_where_query($fieldValue,$field='',$TSconfig=array(),$prefix='')     {
                global $TCA;
-               
+
                t3lib_div::loadTCA($foreign_table);
                $foreign_table = $fieldValue['config'][$prefix.'foreign_table'];
                $rootLevel = $TCA[$foreign_table]['ctrl']['rootLevel'];
@@ -3057,7 +3057,9 @@ class t3lib_BEfunc        {
                                AND (sys_domain.domainName='.$GLOBALS['TYPO3_DB']->fullQuoteStr($domain, 'sys_domain').' or sys_domain.domainName='.$GLOBALS['TYPO3_DB']->fullQuoteStr($domain.'/', 'sys_domain').')'.
                                t3lib_BEfunc::deleteClause('pages'),
                                '', '', '1');
-                       return $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                       $result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
+                       $GLOBALS['TYPO3_DB']->sql_free_result($res);
+                       return $result;
                }
        }