Issues

ZF-7278: Zend_Locale_Format::toNumber does not restore iconv internal encoding setting when finished

Issue Type: Bug Created: 2009-07-14T19:19:17.000+0000 Last Updated: 2010-01-12T13:08:10.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: C Snover (snover) Assignee: Thomas Weidner (thomas) Tags: - Zend_Locale

Related issues: - ZF-8781

Attachments:

Description

Zend_Locale_Format::toNumber sets the iconv internal encoding setting but does not return it back to its original setting when complete.

Patch:

<pre class="highlight">
--- Format.php  (revision 16719)
+++ Format.php  (working copy)
@@ -334,6 +334,7 @@

         // Get correct signs for this locale
         $symbols = Zend_Locale_Data::getList($options['locale'], 'symbols');
+        $oldEncoding = iconv_get_encoding('internal_encoding');
         iconv_set_encoding('internal_encoding', 'UTF-8');

         // Get format
@@ -494,6 +495,7 @@
             }
         }

+        iconv_set_encoding('internal_encoding', $oldEncoding);
         return (string) $format;
     }

Comments

Posted by Thomas Weidner (thomas) on 2009-08-23T12:34:45.000+0000

Fixed with r17783

Have you found an issue?

See the Overview section for more details.

Copyright

© 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.

Contacts