stayallive / wp-sentry

A (unofficial) WordPress plugin reporting PHP and JavaScript errors to Sentry.
https://wordpress.org/plugins/wp-sentry-integration/
MIT License
305 stars 48 forks source link

Fix: undefined index: release #122

Closed mike-sheppard closed 2 years ago

mike-sheppard commented 2 years ago

Quick fix for undefined index notice by setting a default value for $options['release'].


Error message

E_NOTICE Undefined index: release
File: /plugins/wp-sentry-integration/src/class-wp-sentry-admin-page.php
Line: 203 

Error source

https://github.com/stayallive/wp-sentry/blob/64afbb3af48ada5b2072cde2e2d5896e10b7fe27/src/class-wp-sentry-admin-page.php#L203

stayallive commented 2 years ago

I went another route to fixing this since I think that even though your fix is correct it's better addressed in the admin page itself, so I've done that instead: 1198a1afa6c07cec21c60c2eb345c696d2b3d73b.

Thanks for your PR and for "noticing" this!