Seravo / seravo-plugin

Enhances WordPress with Seravo specific features and integrations
https://seravo.com/
GNU General Public License v2.0
38 stars 16 forks source link

Notice: Undefined index: HTTP_REFERER #252

Closed TeemuSuoranta closed 5 years ago

TeemuSuoranta commented 5 years ago

When /wp-admin/ is opened in new tab when logged in, the HTTP_REFERER is not set and should be checked before referenced.

Full notice:

Notice: Undefined index: HTTP_REFERER in /data/wordpress/htdocs/wp-content/mu-plugins/seravo-plugin/modules/check-php-version.php on line 30

This can be simply checked by:

if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'wp-login.php') === false) {
ottok commented 5 years ago

What version are you running? Did you try wp-seravo-plugin-update ?

TeemuSuoranta commented 5 years ago

It's the 1.9.9 which is the newest release. The buggy code is in https://github.com/Seravo/seravo-plugin/blob/master/modules/check-php-version.php#L30

TeemuSuoranta commented 5 years ago

PHP version is 7.2 in case that handling $_SERVER['HTTP_REFERER'] has somehow changed in 7.3

JoosuaKoskinen commented 5 years ago

This was fixed in https://github.com/Seravo/seravo-plugin/pull/253.