diff options
author | Joas Schilling <coding@schilljs.com> | 2024-11-08 11:48:55 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-11-08 12:59:15 +0100 |
commit | 34592df1861e33ddcca0c6e2e107cef6d4631c85 (patch) | |
tree | e4d2c7fd88b2f8217b39d6f55f5cc667f73d93dd /lib | |
parent | 8952a4cb77c94af3c707c873a0252e5e6cd2ef15 (diff) | |
download | nextcloud-server-34592df1861e33ddcca0c6e2e107cef6d4631c85.tar.gz nextcloud-server-34592df1861e33ddcca0c6e2e107cef6d4631c85.zip |
fix(util): Correctly create Reflection of method for PHP 8.3+
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Util.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 7b41f797e32..f82082d3d12 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -878,7 +878,12 @@ class OC_Util { * @return bool */ public static function isAnnotationsWorking() { - $reflection = new \ReflectionMethod(__METHOD__); + if (PHP_VERSION_ID >= 80300) { + /** @psalm-suppress UndefinedMethod */ + $reflection = \ReflectionMethod::createFromMethodName(__METHOD__); + } else { + $reflection = new \ReflectionMethod(__METHOD__); + } $docs = $reflection->getDocComment(); return (is_string($docs) && strlen($docs) > 50); |