Permalink
Browse files

Fix dynamic property accessor syntax to be compatible with PHP7

  • Loading branch information...
vansante committed Oct 1, 2015
1 parent a763db1 commit 3d0af0c28be66246ed492f44d811cb4fb2280bc2
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/Doctrine/Collection.php
  2. +2 −2 lib/Doctrine/Query/Abstract.php
@@ -472,7 +472,7 @@ public function add($record, $key = null)
$relations = $this->relation['table']->getRelations();
foreach ($relations as $relation) {
if ($this->relation['class'] == $relation['localTable']->getOption('name') && $relation->getLocal() == $this->relation->getForeignFieldName()) {
$record->$relation['alias'] = $this->reference;
$record->{$relation['alias']} = $this->reference;
break;
}
}
@@ -1135,8 +1135,8 @@ protected function _preQuery($params = array())
$params = array('component' => $component, 'alias' => $alias);
$event = new Doctrine_Event($record, $callback['const'], $this, $params);
$record->$callback['callback']($event);
$table->getRecordListener()->$callback['callback']($event);
$record->{$callback['callback']}($event);
$table->getRecordListener()->{$callback['callback']}($event);
}
}

0 comments on commit 3d0af0c

Please sign in to comment.