diff -r 5e7a0fedabdf -r 877f952ae2bd web/lib/Zend/Locale/Format.php --- a/web/lib/Zend/Locale/Format.php Thu Mar 21 17:31:31 2013 +0100 +++ b/web/lib/Zend/Locale/Format.php Thu Mar 21 19:50:53 2013 +0100 @@ -15,8 +15,8 @@ * @category Zend * @package Zend_Locale * @subpackage Format - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @version $Id: Format.php 22808 2010-08-08 09:38:42Z thomas $ + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @version $Id: Format.php 24807 2012-05-15 12:10:42Z adamlundrigan $ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,7 +29,7 @@ * @category Zend * @package Zend_Locale * @subpackage Format - * @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_Locale_Format @@ -99,8 +99,9 @@ $options['number_format'] = Zend_Locale_Data::getContent($locale, 'decimalnumber'); } else if ((gettype($value) !== 'string') and ($value !== NULL)) { require_once 'Zend/Locale/Exception.php'; + $stringValue = (string)(is_array($value) ? implode(' ', $value) : $value); throw new Zend_Locale_Exception("Unknown number format type '" . gettype($value) . "'. " - . "Format '$value' must be a valid number format string."); + . "Format '$stringValue' must be a valid number format string."); } break; @@ -113,8 +114,9 @@ $options['date_format'] = Zend_Locale_Format::getDateFormat($locale); } else if ((gettype($value) !== 'string') and ($value !== NULL)) { require_once 'Zend/Locale/Exception.php'; + $stringValue = (string)(is_array($value) ? implode(' ', $value) : $value); throw new Zend_Locale_Exception("Unknown dateformat type '" . gettype($value) . "'. " - . "Format '$value' must be a valid ISO or PHP date format string."); + . "Format '$stringValue' must be a valid ISO or PHP date format string."); } else { if (((isset($options['format_type']) === true) and ($options['format_type'] == 'php')) or ((isset($options['format_type']) === false) and (self::$_options['format_type'] == 'php'))) { @@ -300,8 +302,8 @@ // load class within method for speed require_once 'Zend/Locale/Math.php'; + $value = Zend_Locale_Math::floatalize($value); $value = Zend_Locale_Math::normalize($value); - $value = Zend_Locale_Math::floatalize($value); $options = self::_checkOptions($options) + self::$_options; $options['locale'] = (string) $options['locale']; @@ -1137,7 +1139,7 @@ if (empty($options['date_format'])) { $options['format_type'] = 'iso'; - $options['date_format'] = self::getDateFormat($options['locale']); + $options['date_format'] = self::getDateFormat(isset($options['locale']) ? $options['locale'] : null); } $options = self::_checkOptions($options) + self::$_options;