dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Safe replacement of a lot of `!count()` with `=== []`
[lhc/web/wiklou.git]
/
includes
/
libs
/
lockmanager
/
PostgreSqlLockManager.php
diff --git
a/includes/libs/lockmanager/PostgreSqlLockManager.php
b/includes/libs/lockmanager/PostgreSqlLockManager.php
index
d6b1ce8
..
fd3ffa5
100644
(file)
--- a/
includes/libs/lockmanager/PostgreSqlLockManager.php
+++ b/
includes/libs/lockmanager/PostgreSqlLockManager.php
@@
-1,4
+1,7
@@
<?php
<?php
+
+use Wikimedia\Rdbms\DBError;
+
/**
* PostgreSQL version of DBLockManager that supports shared locks.
* All locks are non-blocking, which avoids deadlocks.
/**
* PostgreSQL version of DBLockManager that supports shared locks.
* All locks are non-blocking, which avoids deadlocks.
@@
-15,7
+18,7
@@
class PostgreSqlLockManager extends DBLockManager {
protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
$status = StatusValue::newGood();
protected function doGetLocksOnServer( $lockSrv, array $paths, $type ) {
$status = StatusValue::newGood();
- if (
!count( $paths )
) {
+ if (
$paths === []
) {
return $status; // nothing to lock
}
return $status; // nothing to lock
}