diff options
author | Simon L <szaimen@e.mail.de> | 2023-11-03 11:47:12 +0100 |
---|---|---|
committer | Simon L <szaimen@e.mail.de> | 2023-11-03 11:47:12 +0100 |
commit | 531f5d1e4fcbc3e3f1801b272935affbed0acd90 (patch) | |
tree | e34aeb6fc3ca7570bc4b562c31c4ae06261f3d40 | |
parent | ba93afbddd4930408129e863957fd7b631582ae2 (diff) | |
download | nextcloud-server-531f5d1e4fcbc3e3f1801b272935affbed0acd90.tar.gz nextcloud-server-531f5d1e4fcbc3e3f1801b272935affbed0acd90.zip |
fix semaphore guarding
Signed-off-by: Simon L <szaimen@e.mail.de>
-rw-r--r-- | lib/private/Preview/Generator.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php index 4a1270fa4a6..d936f1d65ad 100644 --- a/lib/private/Preview/Generator.php +++ b/lib/private/Preview/Generator.php @@ -244,7 +244,7 @@ class Generator { * @return bool */ public static function unguardWithSemaphore($semId): bool { - if (!is_resource($semId) || !extension_loaded('sysvsem')) { + if ($semId === false || get_class($semId) !== 'SysvSemaphore' || !extension_loaded('sysvsem')) { return false; } return sem_release($semId); |