MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001106XdebugUsage problems (Wrong Results)public2015-02-16 13:402016-05-11 03:24
ReporterDev101 
Assigned Toderick 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSCentOSOS Version6.5
Product Version2.2.7 
Target VersionFixed in Version2.4.1 
Summary0001106: A thrown Exception after a class with __debugInfo gives 2 Errors
DescriptionIf 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
Attached Fileshtml file icon phpinfo.html [^] (105,463 bytes) 2015-03-01 00:19
txt file icon config.txt [^] (1,643 bytes) 2015-10-02 08:19 [Show Content]

- Relationships

-  Notes
(0003018)
derick (administrator)
2015-02-28 17:13

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?
(0003019)
Dev101 (reporter)
2015-03-01 00:22

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.
(0003178)
ypnos (reporter)
2015-09-28 14:41

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.
(0003179)
marc-x (reporter)
2015-10-02 08:22

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
(0003479)
edamov (reporter)
2016-02-11 13:32

I have the same issue:

Xdebug v2.4.0beta1
PHP 7.0.2-4+deb.sury.org~trusty+1
(0003572)
Lewolf (reporter)
2016-03-19 13:11

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 [^]
(0003599)
derick (administrator)
2016-05-11 03:24

Fixed on GitHub for 2.4.1.

- Issue History
Date Modified Username Field Change
2015-02-16 13:40 Dev101 New Issue
2015-02-28 17:13 derick Note Added: 0003018
2015-02-28 17:13 derick Assigned To => derick
2015-02-28 17:13 derick Status new => feedback
2015-03-01 00:19 Dev101 File Added: phpinfo.html
2015-03-01 00:22 Dev101 Note Added: 0003019
2015-03-01 00:22 Dev101 Status feedback => assigned
2015-09-28 14:41 ypnos Note Added: 0003178
2015-10-02 08:19 marc-x File Added: config.txt
2015-10-02 08:22 marc-x Note Added: 0003179
2016-02-11 13:32 edamov Note Added: 0003479
2016-03-19 13:11 Lewolf Note Added: 0003572
2016-05-11 03:24 derick Note Added: 0003599
2016-05-11 03:24 derick Status assigned => closed
2016-05-11 03:24 derick Resolution open => fixed
2016-05-11 03:24 derick Fixed in Version => 2.4.1
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker