#32781 [Opn->Fbk]: session_start() outputs newline character when complex object used in session
| From: | sniper@php.net | Date: | Thu, 21 Apr 2005 10:47:42 +0000 |
| Subject: | #32781 [Opn->Fbk]: session_start() outputs newline character when complex object used in session | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77980@lists.php.net to get a copy of this message | ||
ID: 32781
Updated by: sniper@php.net
Reported By: douglas dot day at calendarsystems dot com
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: WinXP
PHP Version: 5.0.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-04-20 20:28:09] douglas dot day at calendarsystems dot com
Description:
------------
I assign a complex object as a session variable, then the next time
session_start() is called, it outputs a newline character (which should
never happen).
If I don't assign this object as a session variable, session_start()
functions normally. Any other action I've taken with $_SESSION
produces the same results, unless I assign the complex object.
Reproduce code:
---------------
// Page 1
$_SESSION["var"] = new MyComplexObject();
// Page 2
ob_start();
$len_before = ob_get_length();
session_start();
$len_after = ob_get_length();
ob_end_flush();
echo $len_before . "," . $len_after;
Expected result:
----------------
Output: 0,0
Actual result:
--------------
Output: [newline]
0,2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32781&edit=1