php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28862 Error on isset char table
Submitted: 2004-06-21 07:53 UTC Modified: 2004-12-26 02:36 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:4 of 5 (80.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: jsgoupil at lookstrike dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.0.0RC3 OS: WinXP
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jsgoupil at lookstrike dot com
New email:
PHP Version: OS:

 

 [2004-06-21 07:53 UTC] jsgoupil at lookstrike dot com
Description:
------------
When I check an isset of a variable that contain text I receive an error ONLY when i check the last+1 char...

NOTE: Working properly on php4.3.6

Reproduce code:
---------------
<?php
$test = "s";
if(isset($test[1]))
	echo "OK";
else
	echo "ERROR";
?>

Expected result:
----------------
It supposed to return "ERROR" because $test[1] is not existing (in real, there is a \0 in C++ but in php, we are not supposed to see it).
(working fine in php4.3.6)

Actual result:
--------------
We currently get "OK"
If we do an isset of $test[2], we get an error...
Obviously, php check the \0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-14 07:24 UTC] jsgoupil at lookstrike dot com
PHP5.0.0 released and you didn't correct that bug ?
Uh ? Where are you ?
 [2004-07-14 09:46 UTC] derick@php.net
Uh, are you paying us to do work?
 [2004-07-14 16:56 UTC] jsgoupil at lookstrike dot com
Just wondering why you release PHP5 and you let this bug open...
 [2004-09-09 07:47 UTC] jsgoupil at lookstrike dot com
It is the same with
$test{1}
And you can also try with negative values.
echo intval(isset($test{-1}));

will return 1 (supposed to be 0)
 [2004-12-26 02:36 UTC] jsgoupil at lookstrike dot com
Corrected in http://bugs.php.net/bug.php?id=29883
Thank you.

Weird that you didn't "use" this one and you used the other one...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC