From 16463229e5bddc0174cdd3638707899527d11f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Sun, 17 Oct 2010 23:39:53 -0430 Subject: [PATCH] Fixing return value of DboSource::boolean() --- cake/libs/model/datasources/dbo_source.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 0fc5be0b9..90e9f34e6 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -2612,7 +2612,7 @@ class DboSource extends DataSource { * Translates between PHP boolean values and Database (faked) boolean values * * @param mixed $data Value to be translated - * @return mixed Converted boolean value + * @return int Converted boolean value */ public function boolean($data) { if ($data === true || $data === false) { @@ -2621,7 +2621,7 @@ class DboSource extends DataSource { } return 0; } else { - return !empty($data); + return (int) !empty($data); } }