17484 Posts in 4473 Topics by 1978 members
|Go to End|
27 September 2007 at 12:29pm
I got this today, when trying to do a bit of custom formy type guff:
Invalid error type specified
At line 293 in .../sapphire/security/Geoip.php
It appears that the 'ip2country' function tries to throw an error of type 'E_trigger_error' if it can't resolve a country from a given IP. Unfortunately this constant doesn't exist.
Strangely enough the error didn't occur on another machine running the same code base. This machine also would not have been able to resolve the IP as it also does not have the geoiplookup executable installed. I realise this could be due to all sort of factors, i.e. different php version, error_reporting level etc... I just though I would throw it in for good measure.
I was told (in irc) to post an elegant fix to this bug so that it can be resolved in the next version so here goes: How about change 'E_trigger_error' to 'E_WARNING'. There you go, it's so elegant it makes Princess Di look like Paris Hilton
27 September 2007 at 1:38pm
Let me be the first to correct myself....
It would seem that trigger_error does not allow for use of the 'E_WARNING' error type, there goes my elegant solution :/
|Go to Top|