Skip to content

Commit

Permalink
Fix warning for php8
Browse files Browse the repository at this point in the history
  • Loading branch information
dz0ny authored May 7, 2024
1 parent 5507aad commit ca0cc14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -937,11 +937,11 @@ public function get_wp_version() {
*/
public function get_server_software( $server ) {
// Check Apache
if ( stristr( $_ENV['SERVER_SOFTWARE'], $server ) ) {
if ( isset( $_ENV['SERVER_SOFTWARE'] ) && stristr( $_ENV['SERVER_SOFTWARE'], $server ) ) {
return sanitize_text_field( $_ENV['SERVER_SOFTWARE'] );
}

if ( stristr( $_SERVER['SERVER_SOFTWARE'], $server ) ) {
if ( isset( $_SERVER['SERVER_SOFTWARE'] ) && stristr( $_SERVER['SERVER_SOFTWARE'], $server ) ) {
return sanitize_text_field( $_SERVER['SERVER_SOFTWARE'] );
}

Expand Down
4 changes: 2 additions & 2 deletions src/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: niteoweb
Tags: seo, block, bots, htaccess, apache, secure
Requires at least: 4.0
Tested up to: 6.2.2
Stable tag: 1.3.5
Tested up to: 6.5.2
Stable tag: 1.3.6

SpiderBlocker will block most common bots that consume bandwidth and slow down your server.

Expand Down

0 comments on commit ca0cc14

Please sign in to comment.