diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-03-17 01:20:44 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-04-19 13:22:23 +0200 |
commit | ee6167879ecba11dea945f129c026ce0f3cf7514 (patch) | |
tree | 426aa5f7ec7c0643770b4e5b40c9f0c2011d31d5 /phpBB/includes/session.php | |
parent | 32bc980ca06b67789d8fd86e4c3a5c897a6de23f (diff) | |
download | forums-ee6167879ecba11dea945f129c026ce0f3cf7514.tar forums-ee6167879ecba11dea945f129c026ce0f3cf7514.tar.gz forums-ee6167879ecba11dea945f129c026ce0f3cf7514.tar.bz2 forums-ee6167879ecba11dea945f129c026ce0f3cf7514.tar.xz forums-ee6167879ecba11dea945f129c026ce0f3cf7514.zip |
[ticket/9802] Fix redundant str_replace call. No need to replace ' ' with ' '.
PHPBB3-9802
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r-- | phpBB/includes/session.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index d803f8d799..9ab53d38ab 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -221,7 +221,7 @@ class session // if the forwarded for header shall be checked we have to validate its contents if ($config['forwarded_for_check']) { - $this->forwarded_for = preg_replace('#[ ]{2,}#', ' ', str_replace(array(',', ' '), ' ', $this->forwarded_for)); + $this->forwarded_for = preg_replace('#[ ]{2,}#', ' ', str_replace(',', ' ', $this->forwarded_for)); // split the list of IPs $ips = explode(' ', $this->forwarded_for); @@ -268,7 +268,7 @@ class session // Why no forwarded_for et al? Well, too easily spoofed. With the results of my recent requests // it's pretty clear that in the majority of cases you'll at least be left with a proxy/cache ip. $this->ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars((string) $_SERVER['REMOTE_ADDR']) : ''; - $this->ip = preg_replace('#[ ]{2,}#', ' ', str_replace(array(',', ' '), ' ', $this->ip)); + $this->ip = preg_replace('#[ ]{2,}#', ' ', str_replace(',', ' ', $this->ip)); // split the list of IPs $ips = explode(' ', $this->ip); |