php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21953 $_session looses type
Submitted: 2003-01-29 15:34 UTC Modified: 2003-01-31 18:41 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: wvdmark at computer dot org Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.0 OS: linux
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: wvdmark at computer dot org
New email:
PHP Version: OS:

 

 [2003-01-29 15:34 UTC] wvdmark at computer dot org
The following snippet:
$bunch=10;
$_SESSION['mail'] = (int)$_SESSION['mail'] + $bunch;
only works with the (int) in front of $_session.

Otherwise get "unsupported operand types" error.

This is mysterious, Session control in PHP should preserve type.
Typical Session file was as follows:
mail|i:-1;Mail_title|s:4:"test";Mail_body|s:4:"test";
you see mail was of type i.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-31 04:35 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2003-01-31 15:09 UTC] wvdmark at computer dot org
Sorry this is bogus.
I don't know what happened, but now it works as expected.
 [2003-01-31 18:41 UTC] sniper@php.net
as you wish.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 18:01:32 2025 UTC