diff -r 5e7a0fedabdf -r 877f952ae2bd web/lib/Zend/Amf/Parse/Amf0/Serializer.php --- a/web/lib/Zend/Amf/Parse/Amf0/Serializer.php Thu Mar 21 17:31:31 2013 +0100 +++ b/web/lib/Zend/Amf/Parse/Amf0/Serializer.php Thu Mar 21 19:50:53 2013 +0100 @@ -15,9 +15,9 @@ * @category Zend * @package Zend_Amf * @subpackage Parse_Amf0 - * @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: Serializer.php 21968 2010-04-22 03:53:34Z matthew $ + * @version $Id: Serializer.php 25179 2012-12-22 21:29:30Z rob $ */ /** Zend_Amf_Constants */ @@ -32,7 +32,7 @@ * @uses Zend_Amf_Parse_Serializer * @package Zend_Amf * @subpackage Parse_Amf0 - * @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_Amf_Parse_Amf0_Serializer extends Zend_Amf_Parse_Serializer @@ -63,8 +63,8 @@ */ public function writeTypeMarker(&$data, $markerType = null, $dataByVal = false) { - // Workaround for PHP5 with E_STRICT enabled complaining about "Only - // variables should be passed by reference" + // Workaround for PHP5 with E_STRICT enabled complaining about "Only + // variables should be passed by reference" if ((null === $data) && ($dataByVal !== false)) { $data = &$dataByVal; } @@ -127,7 +127,7 @@ case (is_bool($data)): $markerType = Zend_Amf_Constants::AMF0_BOOLEAN; break; - case (is_string($data) && (strlen($data) > 65536)): + case (is_string($data) && (($this->_mbStringFunctionsOverloaded ? mb_strlen($data, '8bit') : strlen($data)) > 65536)): $markerType = Zend_Amf_Constants::AMF0_LONGSTRING; break; case (is_string($data)): @@ -187,23 +187,23 @@ * Check if the given object is in the reference table, write the reference if it exists, * otherwise add the object to the reference table * - * @param mixed $object object reference to check for reference - * @param $markerType AMF type of the object to write - * @param mixed $objectByVal object to check for reference + * @param mixed $object object reference to check for reference + * @param string $markerType AMF type of the object to write + * @param mixed $objectByVal object to check for reference * @return Boolean true, if the reference was written, false otherwise */ - protected function writeObjectReference(&$object, $markerType, $objectByVal = false) + protected function writeObjectReference(&$object, $markerType, $objectByVal = false) { - // Workaround for PHP5 with E_STRICT enabled complaining about "Only + // Workaround for PHP5 with E_STRICT enabled complaining about "Only // variables should be passed by reference" if ((null === $object) && ($objectByVal !== false)) { $object = &$objectByVal; } - if ($markerType == Zend_Amf_Constants::AMF0_OBJECT - || $markerType == Zend_Amf_Constants::AMF0_MIXEDARRAY - || $markerType == Zend_Amf_Constants::AMF0_ARRAY - || $markerType == Zend_Amf_Constants::AMF0_TYPEDOBJECT + if ($markerType == Zend_Amf_Constants::AMF0_OBJECT + || $markerType == Zend_Amf_Constants::AMF0_MIXEDARRAY + || $markerType == Zend_Amf_Constants::AMF0_ARRAY + || $markerType == Zend_Amf_Constants::AMF0_TYPEDOBJECT ) { $ref = array_search($object, $this->_referenceObjects, true); //handle object reference