kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-11-24 04:04 pm

[dw-free] weird warning in htdocs/tools/endpoints/esn_inbox.bml

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

http://bugs.dwscoalition.org/show_bug.cgi?id=3252

Handle non-numeric values, just in case.

Patch by [personal profile] kareila.

Files modified:
  • htdocs/tools/endpoints/esn_inbox.bml
--------------------------------------------------------------------------------
diff -r 09e597f01df1 -r a923998bc864 htdocs/tools/endpoints/esn_inbox.bml
--- a/htdocs/tools/endpoints/esn_inbox.bml	Wed Nov 24 09:47:51 2010 -0600
+++ b/htdocs/tools/endpoints/esn_inbox.bml	Wed Nov 24 10:03:46 2010 -0600
@@ -63,7 +63,7 @@ _c?>
     $ret{items} = [];
     my $inbox = $u->notification_inbox;
     my $cur_folder = $POST{'cur_folder'} || 'all';
-    my $itemid = $POST{itemid} ? $POST{itemid} + 0 : 0;
+    my $itemid = $POST{itemid} && $POST{itemid} =~ /^\d+$/ ? $POST{itemid} + 0 : 0;
 
     # do actions
     if ($action eq 'mark_read') {
--------------------------------------------------------------------------------