Bug #25034
closedArgument #1 is not an array in t3lib/class.t3lib_tcemain.php
0%
Description
Hi, in t3lib_TCEmai::process_datamap() i'm getting
PHP Warning: array_merge(): Argument #1 is not an array in t3lib/class.t3lib_tcemain.php line 1137
$data = array('tt_news' => array('foo123' => array(
'title' => "game",
'author' => '',
'author_email' => '',
'short' => "a",
'bodytext' => "looongtext",
'keywords' => '',
'hidden' => 0,
'datetime' => 1297688403,
'pid' => 4,
'type' => 0,
'image' => '',
'category' => '',
)));
$tcemain = t3lib_div::makeInstance('t3lib_TCEmain');
$tcemain->dontProcessTransformations = 1;
$tcemain->stripslashes_values = 0;
$tcemain->start($data, array());
$tcemain->process_datamap();
echo ""; print_r($tcemain->substNEWwithIDs); die("
");
call it like this:
$data = array('tt_news' => array('foo123' => array(
'title' => "game",
'author' => '',
'author_email' => '',
'short' => "a",
'bodytext' => "looongtext",
'keywords' => '',
'hidden' => 0,
'datetime' => 1297688403,
'pid' => 4,
'type' => 0,
'image' => '',
'category' => '',
)));
$tcemain = t3lib_div::makeInstance('t3lib_TCEmain');
$tcemain->dontProcessTransformations = 1;
$tcemain->stripslashes_values = 0;
$tcemain->start($data, array());
$tcemain->process_datamap();
echo "
"; print_r($tcemain->substNEWwithIDs); die("");
(issue imported from #M17580)
Updated by Björn Pedersen almost 14 years ago
if the 'foo123' is really present, then that is the reason for the error:
From reading the code it should either be a valid uid (integer) or the string 'NEW'.
Updated by Steffen Gebert almost 14 years ago
Sebastian, does this solve your problem?
Updated by Sebastian Wagner almost 14 years ago
for strings created with
uniqid('NEW');
it works fine.
thanks alot Björn