mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-21 22:17:44 -04:00
apply null coalescing operator, strict equality, avoid aliases, prefer empty
This commit is contained in:
@@ -73,7 +73,7 @@ class TrafficLimiter extends AbstractPersistence
|
||||
self::setExempted($conf->getKey('exempted', 'traffic'));
|
||||
self::setLimit($conf->getKey('limit', 'traffic'));
|
||||
|
||||
if (($option = $conf->getKey('header', 'traffic')) !== '') {
|
||||
if (!empty($option = $conf->getKey('header', 'traffic'))) {
|
||||
$httpHeader = 'HTTP_' . $option;
|
||||
if (array_key_exists($httpHeader, $_SERVER) && !empty($_SERVER[$httpHeader])) {
|
||||
self::$_ipKey = $httpHeader;
|
||||
|
||||
Reference in New Issue
Block a user