Follow-up of bug #13670: forgotten reset/each statement caused side effect of using...
authorXavier Perseguers <typo3@perseguers.ch>
Thu, 27 May 2010 15:56:59 +0000 (15:56 +0000)
committerXavier Perseguers <typo3@perseguers.ch>
Thu, 27 May 2010 15:56:59 +0000 (15:56 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7699 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_admin.php

index 8f12058..d60a12e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-05-27  Xavier Perseguers  <typo3@perseguers.ch>
 
+       * Follow-up of bug #13670: forgotten reset/each statement caused side effect of using foreach statement
        * Fixed bug #14456: SQL parser doesn't accept ALTER TABLE statement without CHANGE, DROP or ADD keyword
        * Fixed bug #13934: Side-effect of substr in t3lib_cs (thanks to Rens Admiraal)
 
index c603452..f05b542 100644 (file)
@@ -494,8 +494,7 @@ class t3lib_admin {
 
                                        if(t3lib_extMgm::isLoaded('dbal')) {
                                                $fields = $GLOBALS['TYPO3_DB']->admin_get_fields($table);
-                                               reset($fields);
-                                               list(,$field)=each($fieldArr);
+                                               $field = array_shift($fieldArr);
                                                $cl_fl = ($GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'],$table) == 'I' || $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'],$table) == 'N' || $GLOBALS['TYPO3_DB']->MetaType($fields[$field]['type'],$table) == 'R') ?
                                                $field.'!=0' : $field.'!=\'\'';
                                                foreach ($fieldArr as $field) {