From a652d34b1e4f1dc9b5e0371989d16431aa00b30e Mon Sep 17 00:00:00 2001
From: Andreas Fernandez <a.fernandez@scripting-base.de>
Date: Fri, 27 May 2016 12:49:41 +0200
Subject: [PATCH] [FOLLOWUP][BUGFIX] Check if `$rows` is an array before
 iteration

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
index 0e3c9e7bdd6b..e990f53e376d 100644
--- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php
+++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
@@ -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());
                     }
                 }
             }
-- 
GitLab