Skip to content

Fix a PHP notice generating a scoped property access expression #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2018

Conversation

TysonAndre
Copy link
Contributor

And add a unit test

$scopedPropertyAccessExpression->parent = $expression->parent ?? $fallbackParentNode;
if ($expression instanceof Node) {
$expression->parent = $scopedPropertyAccessExpression;
$scopedPropertyAccessExpression->scopeResolutionQualifier = $expression; // TODO ensure always a Node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the TODO now resolved, since it's in instanceof Node?

@TysonAndre
Copy link
Contributor Author

TysonAndre commented Sep 26, 2018

In the negation of the if statement, it's null (not a Node) - I wasn't completely sure what should be done there, so I left the (original) TODO as is for now.

@roblourens roblourens merged commit 54a84f1 into microsoft:master Sep 26, 2018
@TysonAndre TysonAndre deleted the fix-trait-use-notice branch March 27, 2021 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants