Fix for ext-wernis, some rewrites, fixes for array-to-string convertion
[mailer.git] / inc / request-functions.php
index 5f9f1e263bb2b36378af1ddf877dc7d161a2c130..0ae3de0a6a52c4d17edc49eb04507f38ddf6a8b6 100644 (file)
@@ -129,13 +129,13 @@ function REQUEST_POST ($element, $subElement=-1) {
                if (($subElement != -1) && (REQUEST_ISSET_POST($element, $subElement))) {
                        // Then use this
                        $value = SQL_ESCAPE($value[$subElement]);
-               } else {
+               } elseif (!is_array($value)) {
                        // Escape it here
                        $value = SQL_ESCAPE($value);
                }
 
                // Set it in cache
-               $GLOBALS['cache_request']['request_post'][$element][$subElement] = SQL_ESCAPE($value);
+               $GLOBALS['cache_request']['request_post'][$element][$subElement] = $value;
        } // END - if
 
        // Return value