Zend Framework

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

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.4
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Locale
  • Labels:
    None

Description

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

Patch:

--- 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;
     }

Issue Links

Activity

Hide
Thomas Weidner added a comment -

Fixed with r17783

Show
Thomas Weidner added a comment - Fixed with r17783

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: