|  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
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
 [2004-06-21 07:53 UTC] jsgoupil at lookstrike dot com
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:
$test = "s";
	echo "OK";
	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


Add a Patch

Pull Requests

Add a Pull Request


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]
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
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
Thank you.

Weird that you didn't "use" this one and you used the other one...
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Mar 07 16:01:23 2021 UTC