MantisBT - Xdebug
View Issue Details
0000940Xdebug(No Category)public2013-04-04 21:362013-05-18 22:09
jtreminio 
derick 
normalmajoralways
resolvedduplicate 
LinuxDebian2.6.32-46
2.2.1 
 
5.3.10
0000940: xdebug quits when it reaches an object cast to array that contained protected properties
xdebug quits session when it reaches an object, that contains protected properties, that has been cast to an array.
<?php
class foo {
    protected $_type;
 
    public function __construct()
    {
        $this->_type = 'profile';
    }
}
 
// Place breakpoint at line below
$foo = new foo();
 
// xdebug crashes when it goes past line below
$bar = (array) $foo;
 
// This code will still be run, without debug
var_dump($foo);
var_dump($bar);
PHP itself does not segfault and continues execution.
No tags attached.
duplicate of 0000924resolved derick $test = array("\0" => ''); renders variable view inoperable 
Issue History
2013-04-04 21:36jtreminioNew Issue
2013-04-04 21:37jtreminioNote Added: 0002451
2013-05-18 22:09derickNote Added: 0002470
2013-05-18 22:09derickRelationship addedduplicate of 0000924
2013-05-18 22:09derickStatusnew => resolved
2013-05-18 22:09derickResolutionopen => duplicate
2013-05-18 22:09derickAssigned To => derick
2016-07-31 13:35derickCategoryDebug client (console) => debugclient (debugging tool)
2016-07-31 13:35derickCategorydebugclient (debugging tool) => (No Category)

Notes
(0002451)
jtreminio   
2013-04-04 21:37   
$ php -v

PHP 5.3.10 (cli) (built: Jan 30 2013 09:29:03)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.3.0dev, Copyright (c) 2002-2012, by Derick Rethans

Also tested with

PHP 5.4.13 (cli) (built: Mar 16 2013 13:38:08)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans

and

PHP 5.3.22 (cli) (built: Feb 22 2013 00:34:22)
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
    with test_helpers v1.0.1-dev, Copyright (c) 2009-2012, by Johannes Schlueter, Scott
(0002470)
derick   
2013-05-18 22:09   
Xdebug doesn't actually crash, the IDE seems to be closing the connection. This is a duplicate of 924 which has a better description.