Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REMOTE_ADDR not defined for CLI mode #1916

Closed
abfan1127 opened this issue Oct 23, 2012 · 1 comment
Closed

REMOTE_ADDR not defined for CLI mode #1916

abfan1127 opened this issue Oct 23, 2012 · 1 comment

Comments

@abfan1127
Copy link

In system/core/Input.php, it stores the IP address via $_SERVER['REMOTE_ADDR'].
However, it may not exist in CLI environments. A simple array key test over comes this.

line 351:

$this->ip_address = array_key_exists('REMOTE_ADDR',$_SERVER) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0';
@narfbg
Copy link
Contributor

narfbg commented Oct 23, 2012

#1890.

@narfbg narfbg closed this as completed Oct 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants