#72683Exception in sysext\core\Classes\DataHandling\DataHandler.php
Description
By copying a page tree using something like:
private function clonePages($conf)
{
$cmdmap['pages'][$this->pageTreeToCopy]['copy'] = $conf['root'];
$this->tce->copyTree = $conf['recursiveLevel'];
$this->tce->start(false, $cmdmap);
$this->tce->process_cmdmap();
return $this->tce->copyMappingArray_merged;
}
the method “copySpecificPage” in sysext\core\Classes\DataHandling\DataHandler.php throws an exception.
#1: PHP Warning: Invalid argument supplied for foreach() in /var/www/vagrant/htdocs/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 3632
wich is this line:
[...]
foreach ($rows as $row) {
[...]
Adding the following solves the issue for the moment:
[...]
+ if(is_array($rows)) {
foreach ($rows as $row) {
[...]
Probably happening since it was reworked.
Checked the file from 7.3 (from GitHub), worked as expected.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.