mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Fixing return value of DboSource::boolean()
This commit is contained in:
parent
d9c9a32ff3
commit
16463229e5
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue