Thursday, June 28, 2012

Re: Error viewing ID 0


The requested address '//types/view/0' was not found on this server.

Please note the // in the front, shouldn't be a huge problem, but there should just be one.
 
Does anyone have any ideas how to get around this? One way would be to change it to a non 0 id, but that would be a ton of records to edit.
 
Please be aware that 0 is a very tricky integer in PHP. Many checks see 0 as "invalid" value. E.g. the empty() function treats 0 as "empty". And it also evaluates to false if non-strict checking (== instead of ===) is used.
Most likely the problem is somewhere down that path. If possible, converting the 0-id records to something else would be your best bet as it's really a pain to work around.

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