mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +02:00
Minor adjustment to @horst-n PR #14
This commit is contained in:
@@ -651,7 +651,7 @@ class Session extends Wire implements \IteratorAggregate {
|
|||||||
*/
|
*/
|
||||||
public function getIP($int = false, $useClient = false) {
|
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
|
// 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';
|
$ip = '127.0.0.1';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user