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

Matthew Somerville matthew at mysociety.org
Mon Jan 26 19:55:56 CET 2009


Petter Reinholdtsen wrote:
> [Matthew Somerville]
>> 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 do not believe it is a problem, as the return value from consequtive
> dbh() calls should be the same variable, and thus the same HandleError
> will be operated on too.

Well, it was throwing warnings to do with undefined variables, as I 
said, so it definitely was a problem :)

 > Anyway, to make it more clear that the same
> variable is operated on, this patch work too.

Applied.

ATB,
Matthew


More information about the fiksgatami mailing list