Pingback.php: Minor cleanup
* Fix comments at end of lines of code * Swap ini_get( 'memory_limit' ) comparison to !== and compare to a string ** ini_get returns a string - https://www.php.net/manual/en/function.ini-get.php Change-Id: I3026578cbe5189fdb703233c25aaa42cfa2cb664
This commit is contained in:
parent
e47b3bc655
commit
55561aef17
1 changed files with 5 additions and 3 deletions
|
|
@ -147,12 +147,14 @@ class Pingback {
|
|||
private function acquireLock() : bool {
|
||||
$cacheKey = $this->cache->makeKey( 'pingback', $this->key );
|
||||
if ( !$this->cache->add( $cacheKey, 1, $this->cache::TTL_HOUR ) ) {
|
||||
return false; // throttled
|
||||
// throttled
|
||||
return false;
|
||||
}
|
||||
|
||||
$dbw = $this->lb->getConnectionRef( DB_MASTER );
|
||||
if ( !$dbw->lock( $this->key, __METHOD__, 0 ) ) {
|
||||
return false; // already in progress
|
||||
// already in progress
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -200,7 +202,7 @@ class Pingback {
|
|||
}
|
||||
|
||||
$limit = ini_get( 'memory_limit' );
|
||||
if ( $limit && $limit != -1 ) {
|
||||
if ( $limit && $limit !== "-1" ) {
|
||||
$event['memoryLimit'] = $limit;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue