From: martin at bamg dot ca Operating system: RH7.3 PHP version: 4.3.2 PHP Bug Type: Session related Bug description: Objects get unregistered from session when using floats
Description: ------------ CONFIG: ./configure --with-apxs=/usr/local/apache/bin/apxs --with-png-dir=../libpng-1.2.5/ --with-zlib-dir=../zlib-1.1.4/ --enable-ftp --with-jpeg-dir=../jpeg-6b/ --with-mysql=../../mysql --enable-gd-imgstrttf --enable-gd-native-ttf --with-mm=../mm-1.3.0/ --enable-trans-sid --with-mcrypt --enable-memory-limit --with-gd --enable-cgi-redirect Making any of a registered object's variables into floats de-registers the object from the session. Reproduce code: --------------- session_start(); session_register( "test" ); echo "IS OBJECT: " . is_object( $test ); class testclass { var $float; function testclass() { $this->float = 2; } function setValue( $val ) { $this->float = $val; } } $test = new testclass(); //$test->setValue( 2.0 ); //uncomment here Expected result: ---------------- In the provided code, running the script and reloading the page returns: IS OBJECT: 1 which is fine Actual result: -------------- Now, uncommenting the last line of the script, which sets "$this->float" to a float value and reloading the page returns: IS OBJECT: which is not good. $test is no longer recognized as an object. -- Edit bug report at http://bugs.php.net/?id=24625&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24625&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24625&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24625&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24625&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24625&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24625&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24625&r=support Expected behavior: http://bugs.php.net/fix.php?id=24625&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24625&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24625&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24625&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24625&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24625&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24625&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24625&r=gnused