Merge pull request #3554 from Alkarex/semaphore_warning
Hide semaphore warning
This commit is contained in:
commit
8863f0e234
|
@ -156,9 +156,14 @@ class Lock {
|
|||
* @param string $fn_name Name of the lock
|
||||
*/
|
||||
public static function remove($fn_name) {
|
||||
if (function_exists('sem_get') && self::$semaphore[$fn_name]) {
|
||||
sem_release(self::$semaphore[$fn_name]);
|
||||
return;
|
||||
if (function_exists('sem_get')) {
|
||||
if (empty(self::$semaphore[$fn_name])) {
|
||||
return false;
|
||||
} else {
|
||||
$success = @sem_release(self::$semaphore[$fn_name]);
|
||||
unset(self::$semaphore[$fn_name]);
|
||||
return $success;
|
||||
}
|
||||
}
|
||||
|
||||
$memcache = self::connectMemcache();
|
||||
|
|
Loading…
Reference in New Issue
Block a user