Project

General

Profile

Actions

Bug #74125

closed

Exception throwing in sysext\core\Classes\DataHandling\DataHandler.php on copySpecificPage

Added by Ricky Mathew about 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2016-03-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When i tried to copy files from one domain with some what a complex pagetree having 6 to 7 levels of pages and having 2 translations for each page, there throwed an error like this


Uncaught TYPO3 Exception
#1: PHP Warning: Invalid argument supplied for foreach() in /typo3_src-7.6.4/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3635 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
/var/data/www/pits/shyam7/typo3_src-7.6.4/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 111.

14 TYPO3\CMS\Core\Error\ErrorHandler::handleError(2, "Invalid argument supplied for foreach()", "/typo3_src-7.6.4/typo3/sysext/core/Classes/DataHandling/DataHandler.php", 3635, array)

/typo3_src-7.6.4/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
03633:                     }
03634: 
03635:                     foreach ($rows as $row) {
03636:                         // Skip localized records that will be processed in
03637:                         // copyL10nOverlayRecords() on copying the default language record

13 TYPO3\CMS\Core\DataHandling\DataHandler::copySpecificPage(95715, 95688, array, 1) 

if i put

                            foreach ($rows as $row) {
                                // Skip localized records that will be processed in
                                // copyL10nOverlayRecords() on copying the default language record
                                $transOrigPointer = $row[$transOrigPointerField];
                                if ($row[$languageField] > 0 && $transOrigPointer > 0 && isset($rows[$transOrigPointer])) {
                                    continue;
                                }
                                // Copying each of the underlying records...
                                $this->copyRecord($table, $row['uid'], $theNewRootID);
                            }

inside if(!empty($rows)) it works as expected.


Related issues 2 (0 open2 closed)

Has duplicate TYPO3 Core - Bug #75530: Duplicating a pagetree with rightclick, copy and paste throws TYPO3 exception Closed2016-04-12

Actions
Has duplicate TYPO3 Core - Bug #76318: DataHandler::copySpecificPage() throws exception due to bogus TCAClosedAndreas Kienast2016-05-27

Actions
Actions

Also available in: Atom PDF