diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-09-07 08:23:54 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-09-07 08:23:54 +0000 |
commit | a2d546e3c07bd0f3a812593e62c1d9d6dbb5d50e (patch) | |
tree | e691ff8bfaa62b80e2ee2cb86a6a2e4779d80c3e /includes/common.inc | |
parent | 160b2e551be79cb81fdc1663479d603c0c352500 (diff) | |
download | brdo-a2d546e3c07bd0f3a812593e62c1d9d6dbb5d50e.tar.gz brdo-a2d546e3c07bd0f3a812593e62c1d9d6dbb5d50e.tar.bz2 |
#82524 by Heine and AjK. Remove use of array_walk(), which was causing segfaults in this case.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/includes/common.inc b/includes/common.inc index ffe4b0574..21b19f9e5 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -633,32 +633,26 @@ function t($string, $args = 0) { } else { // Transform arguments before inserting them - array_walk($args, '_t'); + foreach($args as $key => $value) { + switch ($key[0]) { + // Escaped only + case '@': + $args[$key] = check_plain($value); + break; + // Escaped and placeholder + case '%': + default: + $args[$key] = theme('placeholder', $value); + break; + // Pass-through + case '!': + } + } return strtr($string, $args); } } /** - * Helper function: apply the appropriate transformation to st() and t() - * placeholders. - */ -function _t(&$value, $key) { - switch ($key[0]) { - // Escaped only - case '@': - $value = check_plain($value); - return; - // Escaped and placeholder - case '%': - default: - $value = theme('placeholder', $value); - return; - // Pass-through - case '!': - } -} - -/** * @defgroup validation Input validation * @{ * Functions to validate user input. |