Monday, October 4, 2010

Strange blackHoleCallback behavior

Hi all

Because I didn't like the white screens of death (WSOD) I was facing
from time to time, I decided to add a blackHoleCallback to my
application controller.

# app_controller.php
function beforeFilter() {
$this->Security->blackHoleCallback = 'blackHole';
}

function blackHole() {
die("Black hole!");
}

When now a black hole is triggered, I get "Black hole!" printed on the
screen.

But strange - when I remove the blackHole() function (but keep the
rest of the code above) then I get no WSOD anymore, but the page is
normally displayed!

(The black hole was triggered by changing a POST form manually so the
token check fails and normally this would result in a 404 not found
WSOD).

Is this behavior normal? Seems rather like a bug to me!

Thanks for help
Josh

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en

No comments: