Re: PHP 4.0 Bug #4626: number_format("string", int) crashes

From: Date: Sat, 27 May 2000 14:55:10 +0000
Subject: Re: PHP 4.0 Bug #4626: number_format("string", int) crashes
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-19595@lists.php.net to get a copy of this message
another NLS number seperator bug. i think i'm the one to blame for all this:( see the change to 1.240 to main.c (php_module_startup) is now doing setlocale(LC_ALL, "") instead of just setlocale(LC_CTYPE, ""). suggested by Jon Forsberg <zzed@cyberdude.com> # this change simply seems "right" as setlocale(LC_ALL, "") also # happens in RSHUTDOWN(basic) #if HAVE_SETLOCALE - setlocale(LC_CTYPE, ""); + setlocale(LC_ALL, ""); #endif i think we need to revert this one the weird thing is that adding setlocale(LC_CTYPE, "") before _or_ after setlocale(LC_ALL, "") does not fix it. could please somebody with more knowledge about NLS and setlocale() have a look? tc ----- Forwarded message from simenbrekken@online.no ----- Mailing-List: contact php-dev-help@lists.php.net; run by ezmlm Precedence: bulk Delivered-To: mailing list php-dev@lists.php.net Date: 26 May 2000 20:55:19 -0000 To: php-dev@lists.php.net From: simenbrekken@online.no Subject: [PHP-DEV] PHP 4.0 Bug #4626: number_format("string", int) crashes From: simenbrekken@online.no Operating system: Windows 2000 Professional (SELECT) PHP version: 4.0.0 Release PHP Bug Type: Reproduceable crash Bug description: number_format("string", int) crashes PHP Code producing the error: <? $int = "string"; echo number_format($int, 2); ?>

« previous php.dev (#19595) next »