Correct references trimming: array_walk can't in all PHP versions use
[squirrelmail.git] / class / deliver / Deliver.class.php
index f22b5f877e05d11b819bd7f13058e82bccf4a2f4..824086aae96b47ec63e641cd1eef2d55474b1cb9 100644 (file)
@@ -742,7 +742,7 @@ class Deliver {
         $aReferences[] = $message_id;
 
         // sanitize the array: trim whitespace, remove dupes
-        array_walk($aReferences, 'trim_value');
+        array_walk($aReferences, 'sq_trim_value');
         $aReferences = array_unique($aReferences);
 
         while ( count($aReferences) > 4 && strlen(implode(' ', $aReferences)) >= 986 ) {
@@ -751,13 +751,6 @@ class Deliver {
         return implode(' ', $aReferences);
     }
 
-    /**
-     * Callback function to trim whitespace from a value, to be used in array_walk
-     */
-    function trim_value ( &$value ) {
-        $value = trim($value);
-    }
-
     /**
      * Converts ip address to hexadecimal string
      *