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

"Only variables should be passed by reference" error in Airbrake/Filter.php #35

Closed fractalis closed 9 years ago

fractalis commented 9 years ago

I've been noticing this error in Filter::filter($filter) for line 41:

$last_element = end(array_keys($this->key_parts));

This is when E_STRICT error reporting is enabled. The fix should be as simple as:

$kp_keys = array_keys($this->key_parts);
$last_element = end($kp_keys);

If you would like I'd be more than happy to submit a pull request if you find the change acceptable.

Thanks!

dbtlr commented 9 years ago

Great find.

Just fixed it.

Thanks!