Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » Invalid error type specified
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: Invalid error type specified | 860 Views |
-
Invalid error type specified

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.phpIt 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
-
Re: Invalid error type specified

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 :/
| 860 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: Euphemismus
Welcome to our latest member: jonchamberlain

