Skip to content

Commit

Permalink
Bugfix: Do not access debug class values before their initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
guelzow committed Feb 29, 2024
1 parent b6c7758 commit 2025ba4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions Documentation/Changelog/Index.rst
Expand Up @@ -25,6 +25,7 @@ Changelog
- [Bugfix] Added a missing entry in the language files.
- [Bugfix] Added missing translations for the setting.
- [Bugfix] Made the feedback clearer when the Ext: resolver could not find a resolved file or directory.
- [Bugfix] Do not access debug class values before their initialization.

5.0.1
- [Feature] Updated to PHP 8.3
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/krexx/CHANGELOG.txt
Expand Up @@ -14,6 +14,8 @@
- Bugfix: Added missing types to the blacklist of none namespaces
declaration types.
- Bugfix: Added missing translations for the setting.
- Bugfix: Do not access debug class values before their
initialization.

5.0.1
- Change: Updated the unit tests to 10.5
Expand Down
Expand Up @@ -121,10 +121,15 @@ public function retrieveValue(ReflectionProperty $refProperty)
}
}

if ($refProperty->isStatic()) {
// Static values are not inside the value array.
$refProperty->setAccessible(true);
return $refProperty->getValue($this->data);
try {
if ($refProperty->isStatic()) {
// Static values are not inside the value array.
$refProperty->setAccessible(true);
return $refProperty->getValue($this->data);
}
} catch (Throwable $throwable) {
// Do nothing.
// We ignore this one.
}

return $this->retrieveEsotericValue($refProperty);
Expand Down
Expand Up @@ -173,7 +173,7 @@ public function testReadSourcecodeMessedUp()
410,
510
),
'The file or directory does not exist.'
'The file does not exist.'
);

// Now to read with really messed up line numbers.
Expand Down

0 comments on commit 2025ba4

Please sign in to comment.