Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible compatibility issues with PHP 7 #15

Closed
CodeHex opened this issue Aug 30, 2016 · 9 comments
Closed

Possible compatibility issues with PHP 7 #15

CodeHex opened this issue Aug 30, 2016 · 9 comments

Comments

@CodeHex
Copy link

CodeHex commented Aug 30, 2016

This exception occurred when sending errors using the wordpress package using PHP7

Fatal error: Uncaught TypeError: Argument 3 passed to Bugsnag_Error::fromPHPException() must be an instance of Exception, instance of Error given, called in
/home/vagrant/Sites/example.com/public/app/plugins/bugsnag/bugsnag-php/Client.php on line 360 and defined in 
/home/vagrant/Sites/example.com/public/app/plugins/bugsnag/bugsnag-php/Error.php:31 

Stack trace: 
#0 /home/vagrant/Sites/example.com/public/app/plugins/bugsnag/bugsnag-php/Client.php(360): Bugsnag_Error::fromPHPException(Object(Bugsnag_Configuration), Object(Bugsnag_Diagnostics), Object(Error)) 
#1 [internal function]: Bugsnag_Client->exceptionHandler(Object(Error)) 
#2 {main} thrown in /home/vagrant/Sites/example.com/public/app/plugins/bugsnag/bugsnag-php/Error.php on line 31
@GrahamCampbell
Copy link
Contributor

GrahamCampbell commented Aug 30, 2016

Yeh, we just need to download the newest v2 from the PHP library.

@GrahamCampbell
Copy link
Contributor

Wait, but actually, I already fixed this? b704bdb

@GrahamCampbell
Copy link
Contributor

Guess we just need to release 1.3.0?

@GrahamCampbell
Copy link
Contributor

#16

@GrahamCampbell
Copy link
Contributor

Not sure what else we need to do regarding actually publishing this for use?

@mikebronner
Copy link

mikebronner commented Sep 4, 2016

I will give it a go using the dev-master to see if it works (I originally reported the issue a few days back) and let you know.

Update: I'm trying to reproduce the issue, but its not happening at the moment. Will keep trying.

@mikebronner
Copy link

I was able to reproduce the issue again:

Fatal error: Uncaught TypeError: Argument 3 passed to Bugsnag_Error::fromPHPException() must be an instance of Exception, instance of Error given, called in /home/vagrant/Sites/maureentaylor.com/public/app/plugins/bugsnag/bugsnag-php/Client.php on line 360 and defined in /home/vagrant/Sites/maureentaylor.com/public/app/plugins/bugsnag/bugsnag-php/Error.php:31 Stack trace: #0 /home/vagrant/Sites/maureentaylor.com/public/app/plugins/bugsnag/bugsnag-php/Client.php(360): Bugsnag_Error::fromPHPException(Object(Bugsnag_Configuration), Object(Bugsnag_Diagnostics), Object(Error)) #1 [internal function]: Bugsnag_Client->exceptionHandler(Object(Error)) #2 {main} thrown in /home/vagrant/Sites/maureentaylor.com/public/app/plugins/bugsnag/bugsnag-php/Error.php on line 31

Here's the code that caused it, where $content is a snippet of HTML:

    $dom = new DOMDocument();
    $dom->loadHTML($content);

    $caption = $dom->documentElement();

    var_dump($caption); die();

@mikebronner
Copy link

This is probably a duplicate of #13 and #14.

@kattrali
Copy link
Contributor

Fixed via 1.2.0/1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants