Fix for ext-wernis, some rewrites, fixes for array-to-string convertion
[mailer.git] / inc / request-functions.php
index 5f9f1e2..0ae3de0 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