[NUUG fiksgatami] [patch] Avoid internal server errors and improve error message from fixmystreet

Matthew Somerville matthew at mysociety.org
Mon Jan 26 16:05:37 CET 2009


Hi,

Unless I applied the patch incorrectly (always possible :) ), there's a 
problem with your changes to DBHandle.pm - it's possible that a call to 
select_all() is the first call to the database, which means it is the 
call to dbh() that connects to and sets up the database. So $dbh doesn't 
exist before then in order to change its HandleError - dbh() throws a 
warning about dbh_process, and then creates a new_dbh() anyway, so the 
change to HandleError is lost.

I guess the only way to do this for select_all() is to call dbh() first, 
put that in a local variable, change HandleError and then call 
selectall_arrayref.

ATB,
Matthew

Matthew Somerville wrote:
> Petter Reinholdtsen wrote:
>> Please include these patches in a future version of the fixmystreet
>> code.
> 
> These shold all be committed.
> 
> ATB,
> Matthew
> 



More information about the fiksgatami mailing list