microsoft / ApplicationInsights-WordPress

Main development repository for Application Insights WordPress plugin.
MIT License
45 stars 42 forks source link

Any plans to upgrade this plugin to support latest WordPress version #27

Open nickrandolph opened 5 years ago

nickrandolph commented 5 years ago

The plugin is currently appearing as "untested" against the last three major versions of WordPress. Before we use this plugin, it would be good to understand if it is still going to be supported by Microsoft?

korwinus commented 5 years ago

It is working, but sometimes it throws this error:

Fatal error: Uncaught TypeError: Argument 1 passed to ApplicationInsights\WordPress\Server_Instrumentation::exceptionHandler() must be an instance of Exception, instance of Error given in \wp-content\plugins\application-insights\src\Server_Instrumentation.php:47 Stack trace: #0 [internal function]: ApplicationInsights\WordPress\Server_Instrumentation->exceptionHandler(Object(Error)) #1 {main}thrown in \wp-content\plugins\application-insights\src\Server_Instrumentation.php on line 47

korwinus commented 5 years ago

Can someone fix this please?

dulfe commented 5 years ago

@korwinus Just remove \Exception from that method declaration.

If I am not mistaken, older versions of PHP send Error and newer Exception (or the other way around) for exception handling... in any case, removing \Exception fixes the issue.

FYI, PR #23 has that changed and some other small changes... you are welcome to try it :)