Hi Ilia, Did you see the last message...? Any reason not to apply the patch I sent to prevent future bug reports/simplify code? http://news.php.net/php.internals/29315
Matt ----- Original Message ----- From: "Matt Wilmas" Sent: Tuesday, May 08, 2007 > Hi Ilia, all, > > I've attached patches for what I think is a better fix here, and it > simplifies the code. Looking at the CVS log, the is_numeric_string() usage > was added in version 1.120 to fix the first numeric key bug. The simple, > better thing would've been to just change zend_hash... to zend_symtable..., > as I've done now. Ilia, this is basically the same fix as Bug #38464 for > array_count_values(). > > Again, the "symtable" function will handle numeric string keys as elsewhere > in PHP. The only thing that changes from the current code is that strings > with leading whitespace, + sign, or 0s won't be considered numeric again > (e.g. back to behavior before the "symtable" functions were created), which > should be correct if you don't want more future bug reports. ;-) > > > Matt > > > ----- Original Message ----- > From: "Ilia Alshanetsky" > Sent: Saturday, May 05, 2007 > > > iliaa Sat May 5 15:14:56 2007 UTC > > > > Added files: (Branch: PHP_5_2) > > /php-src/ext/wddx/tests bug41283.phpt > > > > Modified files: > > /php-src NEWS > > /php-src/ext/wddx wddx.c > > Log: > > > > Fixed bug #41283 (Bug with serializing array key that are doubles or > > floats). > > > > > http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.15&r2=1.119.2.10.2.16&diff_format=u > > Index: php-src/ext/wddx/wddx.c > > diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.15 > php-src/ext/wddx/wddx.c:1.119.2.10.2.16 > > --- php-src/ext/wddx/wddx.c:1.119.2.10.2.15 Sun Mar 4 04:38:43 2007 > > +++ php-src/ext/wddx/wddx.c Sat May 5 15:14:56 2007 > > @@ -16,7 +16,7 @@ > > > +----------------------------------------------------------------------+ > > */ > > > > -/* $Id: wddx.c,v 1.119.2.10.2.15 2007/03/04 04:38:43 stas Exp $ */ > > +/* $Id: wddx.c,v 1.119.2.10.2.16 2007/05/05 15:14:56 iliaa Exp $ */ > > > > #ifdef HAVE_CONFIG_H > > #include "config.h" > > @@ -984,6 +984,9 @@ > > goto bigint; > > } > > l = (long) d; > > + if (l != d) { > > + goto bigint; > > + } > > case IS_LONG: > > zend_hash_index_update(target_hash, l, &ent1->data, sizeof(zval *), > NULL); > > break; > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php