1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00

Minor adjustment to @horst-n PR #14

This commit is contained in:
Ryan Cramer
2016-10-05 10:43:19 -04:00
parent 637afedade
commit 7f53fbdda0

View File

@@ -651,7 +651,7 @@ class Session extends Wire implements \IteratorAggregate {
*/
public function getIP($int = false, $useClient = false) {
if('cli' == php_sapi_name()) {
if(empty($_SERVER['REMOTE_ADDR'])) {
// when accessing via CLI Interface, $_SERVER['REMOTE_ADDR'] isn't set and trying to get it, throws a php-notice
$ip = '127.0.0.1';