php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29883 isset gives invalid values on strings
Submitted: 2004-08-29 13:11 UTC Modified: 2004-12-01 15:03 UTC
From: tomas_matousek at hotmail dot com Assigned: andi (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.0.1 OS: WinXP
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tomas_matousek at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-08-29 13:11 UTC] tomas_matousek at hotmail dot com
Description:
------------
isset applied on a string with negative index returns true.
It should return false.

Reproduce code:
---------------
$x = "bug";
var_dump(isset($x[-1]));

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-29 15:11 UTC] tony2001@php.net
Andi, please, review & commit these two patches:
http://tony2001.phpclub.net/dev/tmp/bug29883_5_0.diff
http://tony2001.phpclub.net/dev/tmp/bug29883_HEAD.diff

The bug really affects BC issues and should have been fixed long ago IMO.
 [2004-12-01 15:03 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC