Ed Pigg wrote:
Hi all,I've been knocking my head against an error I get from $dbh->quote and I'm sure that I'm missing something obvious. I've just been looking at the same thing too long. Here's the environmentPerl 5.8.4 Mac OS 10.3.5 CGI::Application DBI DBD::mysql# here's the problem - Apache error log says "Error executing run mode 'make_authcode': Can't call method "quote" on an undefined value at XXXX/ASEP.pm line xxxEach time I test the values $authcode, $reqname, $created_ip THEY HAVE VALUES. AUGGGGGGGHHHHH!
That example was a little long and has a lot of code that has nothing (or least I would think so) to do with the problem you're seeing. My first suggestion would be to reduce the code to the smallest possible example that still has the same error.
I'm not even sure that it's C::A issues.
# $authcode = $dbh->quote( $authcode );
The error message doesn't mean that $authcode, $reqname, $created_ip don't have values but that your $dbh is undefined. Test what you're $dbh is before you call quote(). You're pulling it from the param() but not checking to see if it's defined.
Also, I would suggest that you use place holders in your SQL and then DBI take care of the quoting internally.
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.