mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Trac #1533: Fixed Geoip::ip2country() to use user_error() instead of trigger_error() (standard practice, even though user_error()
is just an alias of trigger_error()) and made it raise an appropriate error (E_USER_NOTICE) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43875 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0f24930ccf
commit
7d0ddb9d33
@ -289,12 +289,12 @@ class Geoip extends Object {
|
||||
// Note: At time of writing, $result is always zero for this program
|
||||
|
||||
if ($code == 127) {
|
||||
trigger_error("ip2country($address) cannot find or run geoiplookup executable.", E_trigger_error);
|
||||
user_error("ip2country($address) cannot find or run geoiplookup executable.", E_USER_NOTICE);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($result == false) {
|
||||
trigger_error("ip2country($address): geoiplookup executable returned nothing.", E_trigger_error);
|
||||
user_error("ip2country($address): geoiplookup executable returned nothing.", E_USER_NOTICE);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user