mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-03-29 09:46 pm

[dw-free] Fix use of uninitialized arrayref.

[commit: http://hg.dwscoalition.org/dw-free/rev/070debda1b83]

Fix use of uninitialized arrayref.

Patch by [staff profile] mark.

Files modified:
  • htdocs/support/see_request.bml
--------------------------------------------------------------------------------
diff -r 4a759f0be502 -r 070debda1b83 htdocs/support/see_request.bml
--- a/htdocs/support/see_request.bml	Sun Mar 29 17:29:55 2009 +0000
+++ b/htdocs/support/see_request.bml	Sun Mar 29 21:46:37 2009 +0000
@@ -716,7 +716,7 @@ body<=
 
         foreach my $f ( LJ::Faq->load_all( lang => $curlang ) ) {
             $f->render_in_place( { user => $user, url => $user_url } );
-            push @{ $faqq{ $f->faqcat } }, $f;
+            push @{ $faqq{$f->faqcat} ||= [] }, $f;
         }
 
         my @faqlist = ('0', "(don't reference FAQ)");
@@ -724,7 +724,7 @@ body<=
         {
             push @faqlist, ('0', "[ $faqcat{$faqcat}->{'faqcatname'} ]");
             foreach my $faq ( sort { $a->sortorder <=> $b->sortorder }
-                                   @{ $faqq{$faqcat} } ) {
+                                   @{ $faqq{$faqcat} || [] } ) {
                 my $q = $faq->question_html;
                 next unless $q;
                 $q = "... $q";
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org