use visited lookup with reference to gain performance

This commit is contained in:
Norman Soetbeer 2015-03-20 14:24:11 +01:00 committed by Fabien Potencier
parent 052735d948
commit 2cc5011e2f

View File

@ -1151,7 +1151,7 @@ EOF;
* *
* @return bool * @return bool
*/ */
private function hasReference($id, array $arguments, $deep = false, $visited = array()) private function hasReference($id, array $arguments, $deep = false, &$visited = array())
{ {
foreach ($arguments as $argument) { foreach ($arguments as $argument) {
if (is_array($argument)) { if (is_array($argument)) {