JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
enc_hhmm leaves a blank blank. remove extra whitespace from metaform templates
[wfpl.git] / encode.php
index 57e565c..6102a91 100644 (file)
@@ -168,6 +168,9 @@ function enc_mmddyyyyhhmm($seconds) {
 # takes decimal
 # returns hh:mm
 function enc_hhmm($str) {
+       if(strlen($str) == 0) {
+               return '';
+       }
        $hours = floor($str);
        $minutes = round(($str - $hours) * 60);
        $str = sprintf("%d:%02d", $hours, $minutes);