diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
index 0e3c9e7bdd6b3f40b56ab3c01ba6ff7500e10acc..e990f53e376deab24664d00f9d44b0ba8fcd9346 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());
                     }
                 }
             }