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:
Matt Peel 2007-10-26 02:09:34 +00:00
parent 0f24930ccf
commit 7d0ddb9d33

View File

@ -289,12 +289,12 @@ class Geoip extends Object {
// Note: At time of writing, $result is always zero for this program // Note: At time of writing, $result is always zero for this program
if ($code == 127) { 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; return false;
} }
if ($result == 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; return false;
} }