Re: generateList bug(?) in PHP4

2007-11-16 Thread jez

Just found the problem: long story short, it was me being stupid.

Sorry,
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
-~--~~~~--~~--~--~---



generateList bug(?) in PHP4

2007-11-15 Thread jez

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
-~--~~~~--~~--~--~---



Re: generateList bug(?) in PHP4

2007-11-15 Thread jez

My version of php might be important:
$ php -v
PHP 4.3.9 (cgi) (built: May  4 2007 11:04:51)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


Thanks,
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
-~--~~~~--~~--~--~---