Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r9900: do not try issuing an invalid SQL query ...

Committer: ailyin
do not try issuing an invalid SQL query in case we haven't actually got an identifier to look for, fixes profile edit page that died in some cases on dev servers
U   trunk/cgi-bin/LJ/UserHead.pm
Modified: trunk/cgi-bin/LJ/UserHead.pm
===================================================================
--- trunk/cgi-bin/LJ/UserHead.pm	2011-01-13 08:25:12 UTC (rev 9899)
+++ trunk/cgi-bin/LJ/UserHead.pm	2011-01-13 08:26:42 UTC (rev 9900)
@@ -31,6 +31,8 @@
     my $class = shift;
     my $uh_id = shift;
 
+    return unless $uh_id;
+
     my $dbh = LJ::get_db_writer();
 
     my $uh = $dbh->selectrow_hashref ("SELECT * FROM shop_userheads WHERE uh_id = $uh_id");

Tags: andy, ljcom, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments