mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Return value if value are 0
Save correctly if the value is 0, but after the find is returned as an empty string.
This commit is contained in:
parent
cfa104577f
commit
a4f138813b
1 changed files with 3 additions and 1 deletions
|
@ -305,7 +305,9 @@ class TranslateBehavior extends ModelBehavior {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$value = '';
|
$value = '';
|
||||||
if (!empty($row[$Model->alias][$aliasVirtual])) {
|
if (is_numeric($row[$Model->alias][$aliasVirtual])) {
|
||||||
|
$value = $row[$Model->alias][$aliasVirtual];
|
||||||
|
} elseif (!empty($row[$Model->alias][$aliasVirtual])) {
|
||||||
$value = $row[$Model->alias][$aliasVirtual];
|
$value = $row[$Model->alias][$aliasVirtual];
|
||||||
}
|
}
|
||||||
$row[$Model->alias][$aliasField] = $value;
|
$row[$Model->alias][$aliasField] = $value;
|
||||||
|
|
Loading…
Add table
Reference in a new issue