View Issue Details

IDProjectCategoryView StatusLast Update
0001106XdebugUncategorizedpublic2016-05-11 02:24
ReporterDev101 Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSCentOSOS Version6.5
Product Version2.2.7 
Fixed in Version2.4.1 
Summary0001106: A thrown Exception after a class with __debugInfo gives 2 Errors
Description

If you make an instance of an class that has __debugInfo() implemented and you are throwing an Exception after that you get the following errors:

Warning: Uncaught exception 'Exception' with message 'neee' in test.php:10

and

Fatal error: __debuginfo() must return an array in test.php on line 10

With disabled xDebug all is fine with the script below.

Steps To Reproduce

<?php

class A
{
public function __debugInfo() { return array();}
}

$c = new A();
try{
throw new \Exception("neee");
}
catch (\Exception $e) {
die("all fine");
}

TagsNo tags attached.
Operating System
PHP Version5.6.5-5.6.9

Activities

derick

2015-02-28 17:13

administrator   ~0003018

Your script just outputs "all fine" - like I expect it to do. Are you sure the script that you provided actually gives the output you said it would?

Dev101

2015-03-01 00:22

reporter   ~0003019

yeah i'm sure about this.
i also tried it on a different system (Windows 10 with xampp 5.6.3VC11 and xdebug 2.3.1 VC11)

i tried a bit with some setting, it seems to depend on xdebug.show_local_vars
if its set to 1 the error occurs
if its set to 0 all works fine.

i attached a phpinfo with the configuration where i get the errors.

ypnos

2015-09-28 13:41

reporter   ~0003178

I can reproduce this bug here. It appears when Xdebug is connected to a client (here: PHPStorm).

php 5.6.13
xdebug 2.3.2

Operating System is Arch Linux.

marc-x

2015-10-02 07:22

reporter   ~0003179

There is a problem under such conditions:

Server:
Linux 3.2.0-4-amd64 Debian 3.2.68-1+deb7u3 x86_64
PHP 5.6.13-1~dotdeb+7.1
Xdebug 2.3.3 + config in attached files

Client:
PhpStorm 9.0.2
Windows 7 Home

edamov

2016-02-11 13:32

reporter   ~0003479

I have the same issue:

Xdebug v2.4.0beta1
PHP 7.0.2-4+deb.sury.org~trusty+1

Lewolf

2016-03-19 13:11

reporter   ~0003572

I confirm the issue is still there (Xdebug 2.4.0)

on Laravel Homestead 0.4.2 vagrant box (See https://laravel.com/docs/master/homestead)

Environment is as follows:

Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-25-generic x86_64)
PHP 7.0.2-4+deb.sury.org~trusty+1
Xdebug 2.4.0 (I have updated it against initial vagrant box which comes with 2.4.0RC3 by default)

PHP script that produces the error is copied exactly as is from initial issue.

Screenshot of Xdebug output: http://c2n.me/3vMuQql.png

derick

2016-05-11 02:24

administrator   ~0003599

Fixed on GitHub for 2.4.1.