mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #41289 from nextcloud/backport/41263/stable27
This commit is contained in:
commit
67035ba88c
2 changed files with 4 additions and 11 deletions
|
|
@ -3164,15 +3164,8 @@
|
|||
<file src="lib/private/Preview/Generator.php">
|
||||
<InvalidArgument>
|
||||
<code>$maxPreviewImage</code>
|
||||
<code>$semId</code>
|
||||
<code>IPreview::EVENT</code>
|
||||
</InvalidArgument>
|
||||
<InvalidReturnStatement>
|
||||
<code>$sem</code>
|
||||
</InvalidReturnStatement>
|
||||
<InvalidReturnType>
|
||||
<code>false|resource</code>
|
||||
</InvalidReturnType>
|
||||
<MismatchingDocblockParamType>
|
||||
<code>ISimpleFile</code>
|
||||
</MismatchingDocblockParamType>
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ class Generator {
|
|||
*
|
||||
* @param int $semId
|
||||
* @param int $concurrency
|
||||
* @return false|resource the semaphore on success or false on failure
|
||||
* @return false|\SysvSemaphore the semaphore on success or false on failure
|
||||
*/
|
||||
public static function guardWithSemaphore(int $semId, int $concurrency) {
|
||||
if (!extension_loaded('sysvsem')) {
|
||||
|
|
@ -246,11 +246,11 @@ class Generator {
|
|||
/**
|
||||
* Releases the semaphore acquired from {@see Generator::guardWithSemaphore()}.
|
||||
*
|
||||
* @param resource|bool $semId the semaphore identifier returned by guardWithSemaphore
|
||||
* @param false|\SysvSemaphore $semId the semaphore identifier returned by guardWithSemaphore
|
||||
* @return bool
|
||||
*/
|
||||
public static function unguardWithSemaphore($semId): bool {
|
||||
if (!is_resource($semId) || !extension_loaded('sysvsem')) {
|
||||
public static function unguardWithSemaphore(false|\SysvSemaphore $semId): bool {
|
||||
if ($semId === false || !($semId instanceof \SysvSemaphore)) {
|
||||
return false;
|
||||
}
|
||||
return sem_release($semId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue