ZF-12174: Wrong type Zend_Currency for $currency parameter in Currency viewhelper

Issue Type: Docs: Improvement Created: 2012-04-26T14:11:01.000+0000 Last Updated: 2012-05-06T03:09:21.000+0000 Status: Resolved Fix version(s): - 1.11.12 (22/Jun/12)

  • 1.12.0 (27/Aug/12)

Reporter: Claudio Zizza (zizza) Assignee: Frank Brückner (frosch) Tags: - Zend_View

  • FixForZF1.12

Related issues: Attachments: - Currency.php.patch


The second parameter $currency of the Zend_View_Helper_Currency method currency() has listet Zend_Currency as type in the docs but it isn't used by the method. Instead it checks with is_array if $currency is an array.

Replace Zend_Currency with array in the PHPDocs

<pre class="literal"> 
### Eclipse Workspace Patch 1.0
#P Zend_library
Index: Zend/View/Helper/Currency.php
--- Zend/View/Helper/Currency.php   (Revision 24717)
+++ Zend/View/Helper/Currency.php   (Arbeitskopie)
@@ -62,7 +62,7 @@
      * Output a formatted currency
      * @param  integer|float                    $value    Currency value to output
-     * @param  string|Zend_Locale|Zend_Currency $currency OPTIONAL Currency to use for this call
+     * @param  string|Zend_Locale|array $currency OPTIONAL Currency to use for this call
      * @return string Formatted currency
     public function currency($value = null, $currency = null)


Posted by Frank Brückner (frosch) on 2012-04-26T14:22:17.000+0000

Patch added.

Posted by Frank Brückner (frosch) on 2012-04-26T14:38:03.000+0000

Hi Claudio, thanks for reporting.

Posted by Adam Lundrigan (adamlundrigan) on 2012-05-06T03:09:21.000+0000

Fixed in trunk (1.12.0): r24768 Fixed in release-1.11 (1.11.12): r24769

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.