Skip to content

Commit

Permalink
UI\PresenterComponent: removed references created by loadState() for …
Browse files Browse the repository at this point in the history
…persistent parameters. [Closes nette/nette#703]

This is experimental commit, I hope it will not cause any BC break.
  • Loading branch information
dg committed Apr 17, 2013
1 parent f6a003b commit cda17f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Application/UI/PresenterComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ public function loadState(array $params)
if (!$reflection->convertType($params[$name], $type)) {
throw new Nette\Application\BadRequestException("Invalid value for persistent parameter '$name' in '{$this->getName()}', expected " . ($type === 'NULL' ? 'scalar' : $type) . ".");
}
$this->$name = & $params[$name];
$this->$name = $params[$name];
} else {
$params[$name] = & $this->$name;
$params[$name] = $this->$name;
}
}
$this->params = $params;
Expand Down

0 comments on commit cda17f4

Please sign in to comment.