web/lib/Zend/Json/Server/Response.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
--- a/web/lib/Zend/Json/Server/Response.php	Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/Json/Server/Response.php	Thu Mar 21 19:50:53 2013 +0100
@@ -15,16 +15,16 @@
  * @category   Zend
  * @package    Zend_Json
  * @subpackage Server
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id: Response.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version    $Id: Response.php 24807 2012-05-15 12:10:42Z adamlundrigan $
  */
 
 /**
  * @category   Zend
  * @package    Zend_Json
  * @subpackage Server
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
  */
 class Zend_Json_Server_Response
@@ -144,13 +144,14 @@
      */
     public function setVersion($version)
     {
-        $version = (string) $version;
-        if ('2.0' == $version) {
+        $version = is_array($version)
+            ? implode(' ', $version)
+            : $version;
+        if ((string)$version == '2.0') {
             $this->_version = '2.0';
         } else {
             $this->_version = null;
         }
-
         return $this;
     }
 
@@ -173,7 +174,6 @@
     {
         if ($this->isError()) {
             $response = array(
-                'result' => null,
                 'error'  => $this->getError()->toArray(),
                 'id'     => $this->getId(),
             );
@@ -181,7 +181,6 @@
             $response = array(
                 'result' => $this->getResult(),
                 'id'     => $this->getId(),
-                'error'  => null,
             );
         }