Merge pull request #12411 from ptica/patch-1

Avoid undefined index: null
This commit is contained in:
Mark Story 2018-07-30 14:46:07 -04:00 committed by GitHub
commit a1a1983a7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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];