You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.
If I have a class that contains something like this:
class Something
{
// ...privatestatic$propOne, $propTwo;
// ...
}
What happens is that after parsing, the resulting ClassDefinition contains both properties, but only one property statement (named for only $propTwo, incidentally).
So far, this partly seems to make sense, but the problem comes in PHPSA\Compiler\Expression\StaticPropertyFetch::compile() which has the following code:
With the code sample given above, hasProperty() returns true for $propOne, making it skip the first if block. Then, because there is no property statement named for $propOne, calling getPropertyStatement() returns null.
So, on line 46, $property is set to null, making the call to isStatic() cause a fatal error.
The text was updated successfully, but these errors were encountered:
If I have a class that contains something like this:
What happens is that after parsing, the resulting
ClassDefinition
contains both properties, but only one property statement (named for only$propTwo
, incidentally).So far, this partly seems to make sense, but the problem comes in
PHPSA\Compiler\Expression\StaticPropertyFetch::compile()
which has the following code:With the code sample given above,
hasProperty()
returnstrue
for$propOne
, making it skip the firstif
block. Then, because there is no property statement named for$propOne
, callinggetPropertyStatement()
returnsnull
.So, on line 46,
$property
is set tonull
, making the call toisStatic()
cause a fatal error.The text was updated successfully, but these errors were encountered: