Skip to content

Commit f44654a

Browse files
committed
PHP 7.2 - deprecated "each" calls
PHP 7.2 - deprecated "each" calls
1 parent dccb4f8 commit f44654a

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

lib/Doctrine/Connection/UnitOfWork.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private function _executeDeletions(array $deletions)
237237
$params = array();
238238
$columnNames = array();
239239
foreach ($identifierMaps as $idMap) {
240-
while (list($fieldName, $value) = each($idMap)) {
240+
foreach($idMap as $fieldName => $value) {
241241
$params[] = $value;
242242
$columnNames[] = $table->getColumnName($fieldName);
243243
}
@@ -957,4 +957,4 @@ protected function _assignIdentifier(Doctrine_Record $record)
957957
$record->assignIdentifier(true);
958958
}
959959
}
960-
}
960+
}

lib/Doctrine/Hydrator/Graph.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,14 @@ protected function _getClassnameToReturn(array &$data, $component)
417417
$matchedComponents[] = $table->getComponentName();
418418
}
419419
} else {
420-
list($key, $value) = each($inheritanceMap);
421-
$key = $this->_tables[$component]->getFieldName($key);
422-
if ( ! isset($data[$key]) || $data[$key] != $value) {
423-
continue;
424-
} else {
425-
$matchedComponents[] = $table->getComponentName();
426-
}
420+
foreach($inheritanceMap as $key => $value) {
421+
$key = $this->_tables[$component]->getFieldName($key);
422+
if ( ! isset($data[$key]) || $data[$key] != $value) {
423+
continue;
424+
} else {
425+
$matchedComponents[] = $table->getComponentName();
426+
}
427+
}
427428
}
428429
}
429430

0 commit comments

Comments
 (0)