|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15825 isset() raises warning for undefined class property
Submitted: 2002-03-01 22:32 UTC Modified: 2002-03-02 06:42 UTC
From: Assigned:
Status: Closed Package: Variables related
PHP Version: 4.0CVS-2002-03-0 OS: ANY
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2002-03-01 22:32 UTC]
4.0..x does not raise error, but 4.1.x does.

class testclass { var $dd = ""; }
$test = new testclass();
if (isset($test->dd[0])){
    echo "(A) TRUE \n";
    echo "(A) FALSE \n";
if (is_array($test->dd) && isset($test->dd[0])){
    echo "(B) TRUE \n";
    echo "(B) FALSE \n";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-01 22:32 UTC]
Should be fixed before 4.2.0, IMO
 [2002-03-02 06:04 UTC]
There is nothing wrong here, it prints "PHP Notice:  Uninitialized string offset:  0 in - on line 5" for me, which it should.

 [2002-03-02 06:42 UTC]
I confirmed it also. It seems andrei's patch fixed this somehow.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 01:03:38 2021 UTC