1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-06 05:07:49 +02:00

Text Helper: method strpSlashes() fixed.

This commit is contained in:
Awilum
2012-11-12 21:25:17 +02:00
parent 042075c89a
commit d64cc48d4e

View File

@@ -97,22 +97,20 @@
* echo Text::strpSlashes('some \ text \ here');
* </code>
*
* @param string $str String with slashes
* @return string
* @param mixed $str String or array of strings with slashes
* @return mixed
*/
public static function strpSlashes($str) {
// Redefine vars
$str = (string) $str;
if (is_array($str)) {
foreach ($str as $key => $val) {
$str[$key] = stripslashes($val);
$result[$key] = stripslashes($val);
}
} else {
$str = stripslashes($str);
$result = stripslashes($str);
}
return $str;
return $result;
}