Friday, December 2, 2011

Crazy behaviour of die() method

I was searching through Model.php inside of the cake-lib. I tried to
debug a strange server bug. What I found was an absolutely strange
behaviour of the die() function.

The code:

if ($this->getID() === false) {
die('I died one time. ');
return false;
}
die('I died a second time.');


What I expected:
I died one time.
or
I died a second time.

What happened:
I died one time. I died a second time.

o_0?!?

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