Tuesday, February 28, 2012

Model Array index issue

I have a weird problem with Models and array's

I moved a website from a test server to the live server.
In the new situate all my code started to complaine about undefined
indexes. When debugging an array I see that the array indexes became
numbers instead of the Model names!? What can be the problem of that I
use the exact same installation of cakephp?


Below the 2 examples of arrays.

this is how the array should be.
---------------------------------------------
Array
(
[0] => Array
(
[MenuItemsTemplates] => Array
(
[id] => 152
[menu_item_id] => 1
)

)

This is the array on the live server
----------------------------------------------------
Array
(
[0] => Array
(
[0] => Array
(
[id] => 152
[menu_item_id] => 1

)

)

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: