php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24625 Objects get unregistered from session when using floats
Submitted: 2003-07-12 17:34 UTC Modified: 2003-07-13 08:26 UTC
From: martin at bang dot ca Assigned:
Status: Closed Package: Session related
PHP Version: 4.3.2(RC4) OS: RH7.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: martin at bang dot ca
New email:
PHP Version: OS:

 

 [2003-07-12 17:34 UTC] martin at bang dot ca
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-12 22:46 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Seems to be fixed. (works fine here)

 [2003-07-13 08:26 UTC] martin at bang dot ca
Indeed. This is fixed in the build you mention. Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 15:01:27 2024 UTC