Fix ambiguity when pretty printing dynamic property fetches with arrays

This commit is contained in:
nikic 2011-06-03 18:24:21 +02:00
parent d82bbb3bea
commit d1f09c311e

View File

@ -616,9 +616,7 @@ class PrettyPrinter_Zend extends PrettyPrinterAbstract
// Helpers
public function pObjectProperty($node) {
if ($node instanceof Node_Variable || $node instanceof Node_Expr_ArrayDimFetch) {
return $this->p($node);
} elseif ($node instanceof Node_Expr) {
if ($node instanceof Node_Variable || $node instanceof Node_Expr) {
return '{' . $this->p($node) . '}';
} else {
return $node;