mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-27 04:14:44 +01:00
Fix ambiguity when pretty printing dynamic property fetches with arrays
This commit is contained in:
parent
d82bbb3bea
commit
d1f09c311e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user