mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Avoid undefined index: null (update action)
Avoid Notice (8): Undefined index: null [APP/Vendor/cakephp/cakephp/lib/Cake/Model/Datasource/DboSource.php, line 2180] also discussed here: 22b0275#diff-b8a4043bec5d20830b77d240ae8fdef5R2087 fix for previous instance if same bug already merged here: cakephp#12411 (sorry for overlooking this second use-case :( )
This commit is contained in:
parent
1f1cd775c1
commit
d292a83407
1 changed files with 1 additions and 1 deletions
|
@ -2177,7 +2177,7 @@ class DboSource extends DataSource {
|
|||
$update = $quoted . ' = ';
|
||||
|
||||
if ($quoteValues) {
|
||||
$update .= $this->value($value, $Model->getColumnType($field), isset($schema[$field]) ? $schema[$field]['null'] : true);
|
||||
$update .= $this->value($value, $Model->getColumnType($field), isset($schema[$field]['null']) ? $schema[$field]['null'] : true);
|
||||
} elseif ($Model->getColumnType($field) === 'boolean' && (is_int($value) || is_bool($value))) {
|
||||
$update .= $this->boolean($value, true);
|
||||
} elseif (!$alias) {
|
||||
|
|
Loading…
Reference in a new issue