Hi guys,
Found this problem when amending an existing site for a new customer.
I'm using generateList with a table with just one item in it. Instead
of returning array(2 = 447) as it should, I get the empty array.
I updated cake to the most recent stable version (1.1.18.5850) and had
a dig around, and something very odd seems to be happening. In
model_php4.php, the generateList method includes
code
$return = array_combine($keys, $vals);
return $return;
/code
I can print_r($return) in that function, and get the expected array.
If I print_r the array I get following my call to generateList, I get
the empty array( );
code
$areas = $this-Area-generateList( null, 'area_name ASC', null,
'{n}.Area.id', '{n}.Area.area_name' );
print_r($areas);
/code
Does anybody recognise this bizarre occurrence? My instinct is that it
is a bug in PHP rather than cake, but I cannot recreate it in a stand-
alone test script so I thought I'd ask some cake people.
J.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---