[FOLLOWUP][BUGFIX] Check if `$rows` is an array before iteration 19/48319/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:52:16 +0000 (12:52 +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/48319
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 49271eb..cda90b9 100644 (file)
@@ -3643,7 +3643,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());
                     }
                 }
             }