[FOLLOWUP][BUGFIX] Check if `$rows` is an array before iteration 18/48318/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 27 May 2016 10:49:41 +0000 (12:49 +0200)
committerNicole Cordes <typo3@cordes.co>
Fri, 27 May 2016 10:51:46 +0000 (12:51 +0200)
Use `$table` for logging instead of the hardcoded `pages` table.

Resolves: #74125
Releases: master, 7.6
Change-Id: I13b4306bdc54cf461d23c401d54c04983059df46
Reviewed-on: https://review.typo3.org/48318
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 0e3c9e7..e990f53 100644 (file)
@@ -3506,7 +3506,7 @@ class DataHandler
                             $this->copyRecord($table, $row['uid'], $theNewRootID);
                         }
                     } elseif ($this->enableLogging) {
-                        $this->log('pages', $uid, 5, 0, 1, 'An SQL error occurred: ' . $this->databaseConnection->sql_error());
+                        $this->log($table, $uid, 5, 0, 1, 'An SQL error occurred: ' . $this->databaseConnection->sql_error());
                     }
                 }
             }