From eb8eabfc05eb9cc0482b02b449ebed0f159cacb9 Mon Sep 17 00:00:00 2001 From: radnan Date: Mon, 21 Jan 2013 20:03:25 -0600 Subject: [PATCH] replace array_merge with ArrayUtils::merge --- library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php b/library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php index 063a9a4368c..d03a03b8f36 100644 --- a/library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php +++ b/library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php @@ -17,6 +17,7 @@ use Zend\InputFilter\InputFilterInterface; use Zend\Mvc\Exception\RuntimeException; use Zend\Session\Container; +use Zend\Stdlib\ArrayUtils; use Zend\Validator\ValidatorChain; /** @@ -80,7 +81,7 @@ function($input, $value) { // Run the form validations/filters and retrieve any errors $postFiles = $request->getFiles()->toArray(); $postOther = $request->getPost()->toArray(); - $post = array_merge($postOther, $postFiles); + $post = ArrayUtils::merge($postOther, $postFiles); $form->setData($post); $isValid = $form->isValid(); @@ -88,11 +89,11 @@ function($input, $value) { $errors = (!$isValid) ? $form->getMessages() : null; // Loop through data and merge previous files with new valid files - $postFiles = array_merge( + $postFiles = ArrayUtils::merge( $previousFiles, $this->filterInvalidFileInputPostData($inputFilter, $data) ); - $post = array_merge($post, $postFiles); + $post = ArrayUtils::merge($post, $postFiles); // Save form data in session $container->setExpirationHops(1, array('post', 'errors', 'isValid'));