CHttpRequest::getUserHostAddress() is not static #1

Closed
opened 2026-03-10 16:33:41 +00:00 by dlage · 0 comments
Owner

Created at: 25.09.2015 21:31

Created by: ErikMinekus

When PHP is in strict mode, CGeoIP.php#L90 throws an error. It should be

$ip = Yii::app()->getRequest()->getUserHostAddress();

Imported comments:

By dlage on 2013-06-01 20:12:55 UTC

Thank you. Fixed in: 591383f287

By mrccao on 2015-02-06 06:12:03 UTC

CHttpRequest::getUserHostAddress() Suitable for linux
Yii::app()->getRequest()->getUserHostAddress() Suitable for all

Created at: 25.09.2015 21:31 *Created by: ErikMinekus* When PHP is in strict mode, [CGeoIP.php#L90](https://github.com/dlage/yii-geoip/blob/master/CGeoIP.php#L90) throws an error. It should be ```php $ip = Yii::app()->getRequest()->getUserHostAddress(); ``` **Imported comments:** *By dlage on 2013-06-01 20:12:55 UTC* Thank you. Fixed in: https://github.com/dlage/yii-geoip/commit/591383f287b208eaafc4792098dc310e04402b1b *By mrccao on 2015-02-06 06:12:03 UTC* CHttpRequest::getUserHostAddress() Suitable for linux Yii::app()->getRequest()->getUserHostAddress() Suitable for all
dlage closed this issue 2026-03-10 16:33:41 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dinislage/yii-geoip#1