cakephp/cakephp — pull request #724 by SimonEast (2012-07-20 02:56:00+00:00)
Title: Prevent booleans from being encoded (converted to strings) by h() function

This patch prevents booleans from being encoded (converted to strings) by the global `h()` function. New tests included.

### Background
If booleans are encoded, they become strings which can easily cause fatal PHP errors in PHP versions around 5.2.9 and possibly 5.3 also.

$a = $this->Article->findById(99);	// potentially returns false
$a = h($a);	// translates false to empty string
echo $a['Article']['title'];	// Fatal error on PHP 5.2.9 rather than warning

PHP 5.4.4 displays a warning when this is attempted (thankfully), but I'm not sure how many other PHP versions are affected by this.