JosephLenton / PHP-Error

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

php_error conflicting js? #9

Closed Geczy closed 12 years ago

Geczy commented 12 years ago

After applying #8's fix, I now find javascript failing left and right and resources not being loaded. Not entirely sure why. Nothing in the error log to aid with this one.

Eg the admin panel

JosephLenton commented 12 years ago

I think I get what is happening with this error now. My guess is your page is using a PHP request to get content for a script tag, and so PHP Error thinks your running a regular request, and not one that just returns JS/CSS/whatever.

As a result it includes the JS that does all of the ajax-y error reporting magic into your page.

I've added code to make PHP Error silent when it believes you are doing this. Technically your code (or the plugin) should be changing the mime type to JS, as that is the correct way to return a JS file. If that happens, PHP Error goes quiet.

Please try this again with the current version of PHP Error (from here on GitHub), and see if it fixes the issue for you.

JosephLenton commented 12 years ago

I'm going to close this if there is no update.

If the problem still happens then feel free to open as a new issue, and I'll look it again.