Browse Source

Merge branch 'trunk'

Andy 9 months ago
parent
commit
01bac5e506
3 changed files with 10 additions and 1 deletions
  1. 3 1
      class/mime/Disposition.class.php
  2. 3 0
      class/mime/Language.class.php
  3. 4 0
      functions/mime.php

+ 3 - 1
class/mime/Disposition.class.php

@@ -19,9 +19,11 @@
  * @package squirrelmail
  * @subpackage mime
  * @since 1.3.0
- * @todo FIXME: do we have to declare vars ($name and $properties)?
  */
 class Disposition {
+    var $name;
+    var $properties;
+
     /**
      * Constructor (PHP5 style, required in some future version of PHP)
      * @param string $name

+ 3 - 0
class/mime/Language.class.php

@@ -22,6 +22,9 @@
  * @since 1.3.0
  */
 class Language {
+    var $name;
+    var $properties;
+
     /**
      * Constructor (PHP5 style, required in some future version of PHP)
      * @param mixed $name

+ 4 - 0
functions/mime.php

@@ -848,6 +848,10 @@ function decodeHeader ($string, $utfencode=true,$htmlsafe=true,$decide=false) {
         $string = implode("\n", $string);
     }
 
+    // loose type checking also catches $string === NULL here:
+    if ($string == '')
+        return '';
+
     if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
             function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_decodeheader')) {
         $string = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_decodeheader', $string);