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
|
* @param string $fn_name Name of the lock
|
||||||
*/
|
*/
|
||||||
public static function remove($fn_name) {
|
public static function remove($fn_name) {
|
||||||
if (function_exists('sem_get') && self::$semaphore[$fn_name]) {
|
if (function_exists('sem_get')) {
|
||||||
sem_release(self::$semaphore[$fn_name]);
|
if (empty(self::$semaphore[$fn_name])) {
|
||||||
return;
|
return false;
|
||||||
|
} else {
|
||||||
|
$success = @sem_release(self::$semaphore[$fn_name]);
|
||||||
|
unset(self::$semaphore[$fn_name]);
|
||||||
|
return $success;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$memcache = self::connectMemcache();
|
$memcache = self::connectMemcache();
|
||||||
|
|
Loading…
Reference in a new issue