dbtlr / php-airbrake

A PHP 5.3 library for sending errors to the Airbrake.io service.
http://airbrake.io
MIT License
121 stars 44 forks source link

SimpleXMLElement::addAttribute(): string is not in UTF-8 #50

Closed adamtester closed 8 years ago

adamtester commented 8 years ago

Hello, I'm getting the follow trace in my logs quite a few times:

Uncaught exception 'ErrorException' with message 'SimpleXMLElement::addAttribute(): string is not in UTF-8' in /home/forge/example.co.uk/vendor/dbtlr/php-airbrake/src/Airbrake/Notice.php:59
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'SimpleXMLElemen...', '/home/forge/roc...', 59, Array)
#1 /home/forge/example.co.uk/vendor/dbtlr/php-airbrake/src/Airbrake/Notice.php(59): SimpleXMLElement->addAttribute('file', '')
#2 /home/forge/example.co.uk/vendor/dbtlr/php-airbrake/src/Airbrake/Connection.php(50): Airbrake\Notice->toXml(Object(Airbrake\Configuration))
#3 /home/forge/example.co.uk/vendor/dbtlr/php-airbrake/src/Airbrake/Client.php(117): Airbrake\Connection->send(Object(Airbrake\Notice))
#4 /home/forge/example.co.uk/vendor/dbtlr/php-airbrake/src/Airbrake/Client.php(106): Airbrake\Client->notify(Object(Airbrake\Notice))
#5 /home/forge/example.co.uk/vendor

It's the only error, I think it might be caused by another error and then php-airbrake fails to report it

Line 59 is

$line->addAttribute('file', isset($entry['file']) ? $entry['file'] : '');

It's problem something to do with my code, and I'm still looking into it but I thought I'd open the issue in case you had any ideas?

I'm using Laravel with rigor789/airbrake-laravel which uses this package.

adamtester commented 8 years ago

This actually gets fixed by restarting the server, but then happens again after an hour... I'm going to try migrating the app to a new server and if that fixes it then it must be an issue with nginx or something

adamtester commented 8 years ago

Seems to be an nginx issue so I'll close this!