Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-10-27 03:44:29 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-10-27 03:44:29 +0300
commitdd69cfa1fe3100d851bd29b31e73d2dd5457f6cf (patch)
tree89bdf7cd699e19620525232ce2598f02033cc1af /core/IP.php
parent2c9b9ee11a3937105f1c726ae530fddc60834e6a (diff)
make sure to return correct ip when all IPs are excluded
Diffstat (limited to 'core/IP.php')
-rw-r--r--core/IP.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/IP.php b/core/IP.php
index 6e27832e48..670c674544 100644
--- a/core/IP.php
+++ b/core/IP.php
@@ -101,7 +101,7 @@ class IP
*
* @param string $csv Comma separated list of elements.
* @param array $excludedIps Optional list of excluded IP addresses (or IP address ranges).
- * @return string Last (non-excluded) IP address in the list.
+ * @return string Last (non-excluded) IP address in the list or an empty string if all given IPs are excluded.
*/
public static function getLastIpFromList($csv, $excludedIps = null)
{
@@ -115,6 +115,8 @@ class IP
return $element;
}
}
+
+ return '';
}
return trim(Common::sanitizeInputValue($csv));
}