View Issue Details

IDProjectCategoryView StatusLast Update
0001292XdebugUncategorizedpublic2017-01-03 18:49
Reporterwoojin Assigned Toderick  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformfreebsdOSfreebsdOS Version10.2
Product Version2.4.0 
Summary0001292: NOTICE: PHP message: PHP Fatal error: Access to undeclared static property
Description

<?php
class Session {
protected static $iterations = array();

static public function getInst($params = array()) {
    $iteration = $params['iteration'];

    if (!isset(static::$iterations[$iteration])) {
        self::$iterations[$iteration] = new self($params);
    }

    return self::$iterations[$iteration];
}
Steps To Reproduce

If set break-point to static::$iterations or self::$iterations or step into the line, I get "PHP Fatal error: Access to undeclared static property"!

if do not step/break-point into that line debugging session continous without any problem.

Additional Information

This error only into debug session!

What needed configuration files?

TagsNo tags attached.
Attached Files
xdebug56+.log (81,036 bytes)
new_xdebug56.log (38,464 bytes)
new_session.php (556 bytes)
static_test_chrBrd.log (12,340 bytes)
Operating System
PHP Version5.6.15-5.6.19

Activities

derick

2016-04-10 16:53

administrator   ~0003580

It would be great, if you could follow the instructions at https://xdebug.org/support.php#remote - it would help greatly improve chances of me finding and fixing this bug.

woojin

2016-04-14 13:49

reporter   ~0003583

Last edited: 2016-04-14 13:51

sorry for delay!
test script and log file in attach subject
<?php
class Session {

protected static $iterations = array();

static public function getInst($params = array()) {
    $iteration = $params['iteration'];

    if (!isset(self::$iterations[$iteration])) {
        self::$iterations[$iteration] = new self($params);
    }

    return self::$iterations[$iteration];
}

public function __construct($param) {
    $this->params = $param;
}

}

$sess = Session::getInst(array('iteration' => 'start', 'param1' => 'param1', 'param2' => 'param2', 'param3' => 'param3'));

derick

2016-05-10 22:27

administrator   ~0003597

I've tried reproducing this, but the line numbers in the log file do not seem to match the line numbers in the attached (or copied) file. The log refers to line 34, whereas the file only has 23 lines. Can you please attach a matching file / log combination?

woojin

2016-05-11 08:09

reporter   ~0003601

Last edited: 2016-05-11 08:14

attached two files "NEW_ *"
breakpoint on line 23
NetBeans: step-by-step "F7", error on line 10!

ok?

woojin

2016-09-17 17:05

reporter   ~0003706

Hi, Derick!
you find the opportunity to correct this error?
or advise a method of operating and tracking this type of data

derick

2016-09-19 10:06

administrator   ~0003707

Sorry - I haven't had the time yet!

chrBrd

2016-11-21 01:39

reporter   ~0003769

Last edited: 2016-11-21 02:47

I've attached another log. The script used to generate it can be found at the bottom of the file.

I'm currently running three different servers with three different Xdebug versions:.

Working:
XAMPP with Xdebug v2.2.5 (PHP 5.6.24)

Not working:
Debian 8 with Xdebug v2.4.1 (PHP 5.6.27-0+deb8u1)
Ubuntu 14.04 with Xdebug v2.3.3 (PHP 5.6.20-1+deb.sury.org~trusty+1)

No Docker used for the Linux servers, just old fashioned installs, but they are both running on VirtualBox VMs.

EDIT:
I rolled back my Debian install to v2.2.5 as that version's working in XAMPP; it doesn't work in Debian, at least with the PHP version specified above. Also tried the 2.5RC, just in case, but unsurprisingly no joy there either.

derick

2016-12-04 16:43

administrator   ~0003918

I am reasonable certain that this issue is actually this bug in PHP: https://bugs.php.net/bug.php?id=73545

It would be great if you could try it with the PHP-5.6 branch of PHP (from Git), or any version after 5.6.28 (I realize, that's not released yet).

woojin

2016-12-05 13:17

reporter   ~0003940

I use the following version:
PHP 5.5.35 (cli) (built: May 13 2016 21:29:21)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

PHP 5.6.21 (cli) (built: May 13 2016 21:32:38)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

PHP 7.0.6 (cli) (built: May 13 2016 21:35:53) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

7th version about a mistake or anything I can not tell, but in the previous two, it is (((

derick

2016-12-05 14:17

administrator   ~0003941

Neither 5.5.35 or 5.6.21 are released after 5.6.28, so it's not a surprise they don't have it fixed. You need to wait for 5.6.29 (coming out this week hopefully) in order to verify this bug.

derick

2017-01-03 18:49

administrator   ~0004127

Closing this, as this was likely the PHP issue linked to in an earlier comment.

Issue History

Date Modified Username Field Change
2016-04-09 09:20 woojin New Issue
2016-04-10 16:53 derick Note Added: 0003580
2016-04-10 16:53 derick Assigned To => derick
2016-04-10 16:53 derick Status new => feedback
2016-04-10 16:54 derick Priority immediate => normal
2016-04-10 16:54 derick Severity crash => major
2016-04-14 13:48 woojin File Added: xdebug56+.log
2016-04-14 13:49 woojin Note Added: 0003583
2016-04-14 13:49 woojin Status feedback => assigned
2016-04-14 13:51 woojin Note Edited: 0003583
2016-05-10 22:27 derick Note Added: 0003597
2016-05-10 22:27 derick Status assigned => feedback
2016-05-11 08:06 woojin File Added: new_xdebug56.log
2016-05-11 08:06 woojin File Added: new_session.php
2016-05-11 08:09 woojin Note Added: 0003601
2016-05-11 08:09 woojin Status feedback => assigned
2016-05-11 08:10 woojin Note Edited: 0003601
2016-05-11 08:14 woojin Note Edited: 0003601
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2016-09-17 17:05 woojin Note Added: 0003706
2016-09-19 10:06 derick Note Added: 0003707
2016-11-21 01:24 chrBrd File Added: static_test_chrBrd.log
2016-11-21 01:39 chrBrd Note Added: 0003769
2016-11-21 02:18 chrBrd Note Edited: 0003769
2016-11-21 02:19 chrBrd Note Edited: 0003769
2016-11-21 02:20 chrBrd Note Edited: 0003769
2016-11-21 02:21 chrBrd Note Edited: 0003769
2016-11-21 02:46 chrBrd Note Edited: 0003769
2016-11-21 02:46 chrBrd Note Edited: 0003769
2016-11-21 02:47 chrBrd Note Edited: 0003769
2016-12-04 16:43 derick Note Added: 0003918
2016-12-04 16:43 derick Status assigned => feedback
2016-12-05 13:17 woojin Note Added: 0003940
2016-12-05 13:17 woojin Status feedback => assigned
2016-12-05 14:17 derick Note Added: 0003941
2016-12-05 14:17 derick Status assigned => feedback
2017-01-03 18:49 derick Note Added: 0004127
2017-01-03 18:49 derick Status feedback => resolved
2017-01-03 18:49 derick Resolution open => no change required
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized