Skip to content

Commit 4518c9f

Browse files
committed
added back php version check
1 parent 2cc1d8f commit 4518c9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Analyser/MutatingScope.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ public function rememberConstructorScope(): self
356356

357357
private function isReadonlyPropertyFetchOnThis(PropertyFetch $expr): bool
358358
{
359+
if (!$this->phpVersion->supportsReadOnlyProperties()) {
360+
return false;
361+
}
362+
359363
while ($expr instanceof PropertyFetch) {
360364
if ($expr->var instanceof Variable) {
361365
if (

0 commit comments

Comments
 (0)