Bug 9016: (QA Follow-up) Remove warning from content.length test
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 28 Mar 2014 08:50:11 +0000 (09:50 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 2 May 2014 20:29:18 +0000 (20:29 +0000)
If the letter.content is undef, the content.length test in the letter
template will trigger warning:

    Argument "" isn't numeric in numeric gt (>).

This patch eliminates that warning.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
tools/letter.pl

index 789efcc..06666de 100755 (executable)
@@ -187,7 +187,7 @@ sub add_form {
                 message_transport_type => $mtt,
                 is_html    => $letters->{$mtt}{is_html},
                 title      => $letters->{$mtt}{title},
-                content    => $letters->{$mtt}{content},
+                content    => $letters->{$mtt}{content}//'',
             };
         }
     }