a callback function that is a member function. Moving the function out
of the class seems the best solution.
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11107
7612ce4b-ef26-0410-bec9-
ea0150e637f0
$aReferences[] = $message_id;
// sanitize the array: trim whitespace, remove dupes
$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 ) {
$aReferences = array_unique($aReferences);
while ( count($aReferences) > 4 && strlen(implode(' ', $aReferences)) >= 986 ) {
return implode(' ', $aReferences);
}
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
*
/**
* Converts ip address to hexadecimal string
*
+/**
+ * Callback function to trim whitespace from a value, to be used in array_walk
+ * @param string $value value to trim
+ * @since 1.5.2 and 1.4.7
+ */
+function sq_trim_value ( &$value ) {
+ $value = trim($value);
+}
+