mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Avoid undefined index: null
Avoid Notice (8): Undefined index: null [APP/Vendor/cakephp/cakephp/lib/Cake/Model/Datasource/DboSource.php, line 1013]
also discussed here: 22b0275a58 (diff-b8a4043bec5d20830b77d240ae8fdef5R2087)
This commit is contained in:
parent
ee02d4274f
commit
ca59191d5c
1 changed files with 1 additions and 1 deletions
|
@ -1076,7 +1076,7 @@ class DboSource extends DataSource {
|
|||
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$schema = $Model->schema();
|
||||
$valueInsert[] = $this->value($values[$i], $Model->getColumnType($fields[$i]), isset($schema[$fields[$i]]) ? $schema[$fields[$i]]['null'] : true);
|
||||
$valueInsert[] = $this->value($values[$i], $Model->getColumnType($fields[$i]), isset($schema[$fields[$i]]['null']) ? $schema[$fields[$i]]['null'] : true);
|
||||
$fieldInsert[] = $this->name($fields[$i]);
|
||||
if ($fields[$i] === $Model->primaryKey) {
|
||||
$id = $values[$i];
|
||||
|
|
Loading…
Reference in a new issue