Skip to content

Commit

Permalink
php8 compat.
Browse files Browse the repository at this point in the history
  • Loading branch information
thirsch committed Oct 7, 2021
1 parent 96ea5c6 commit d564c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/Import/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ public function buildActAs($actAs, &$definition)
* @param array $emittedActAs contains on output an array of actAs command to be appended to output
* @return string actAs full definition
*/
private function innerBuildActAs($actAs, $level = 0, $parent = null, array &$emittedActAs, array &$definition)
private function innerBuildActAs($actAs, $level = 0, $parent = null, array &$emittedActAs = array(), array &$definition = array())
{
// rewrite special case of actAs: [Behavior] which gave [0] => Behavior
if (is_array($actAs) && isset($actAs[0]) && !is_array($actAs[0])) {
Expand Down Expand Up @@ -1017,7 +1017,7 @@ private function addActAsColumnsToDefinition($className, $instanceOptions, &$def
}

foreach ($options as $name => $column) {
if (!array_key_exists('name', $column) || !array_key_exists('type', $column)) {
if (!$column || !array_key_exists('name', $column) || !array_key_exists('type', $column)) {
// 'name' or 'type' not found. Unfortunately there is no logger. What is the best way to abort here?
continue;
}
Expand Down

0 comments on commit d564c45

Please sign in to comment.