Skip to content
Permalink
Browse files

Fixing return value of DboSource::boolean()

  • Loading branch information...
lorenzo committed Oct 18, 2010
1 parent d9c9a32 commit 16463229e5bddc0174cdd3638707899527d11f45
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/model/datasources/dbo_source.php
@@ -2612,7 +2612,7 @@ public function length($real) {
* 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 @@ public function boolean($data) {
}
return 0;
} else {
return !empty($data);
return (int) !empty($data);
}
}

0 comments on commit 1646322

Please sign in to comment.
You can’t perform that action at this time.