JosephLenton / PHP-Error

Better error reporting for PHP, and prettier too!
1.35k stars 151 forks source link

No backtrace? #95

Open fcojavierdomenech opened 7 years ago

fcojavierdomenech commented 7 years ago

I was expecting some kind of backtrace like in your examples but I'm only getting the fatal error and where it is. For instance:

<?php

require_once('php_error.php');
\php_error\reportErrors();

class Test
{
    public function A()
    {
        return $this->B();
    }

    public function B()
    {
        return $this->C();
    }

    public function C()
    {
        return $this->D();
    }
}

$test = new Test();
$test->A();

I'm getting:


Call to undefined method Test::D()
39 cgi-bin/scripts/test.php
    }
    /**
     * undocumented function
     *
     * @return void
     */
    public function C()
    {
        return $this->D();
    }
}

While I'd like to see also the backtrace:

14 return $this->C();

9 return $this->B();

24 $test->A();

Am I missing anything?