← All changes
|
src/component/security-tweaks/servers/class-server.php
+2
-2
5.6.2
→
6.3.0
View file →
| @@ -61,9 +61,9 @@ | ||
| 61 | 61 | * @return string Returns the server software type. |
| 62 | 62 | */ |
| 63 | 63 | public static function get_software() { |
| 64 | 64 | $software = defender_get_data_from_request( 'SERVER_SOFTWARE', 's' ); |
| 65 | - if ( empty( $software ) ) { | |
| 65 | + if ( ! is_string( $software ) || '' === $software ) { | |
| 66 | 66 | return self::get_software_by_self_ping(); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | $software = explode( ' ', $software ); |
| @@ -86,9 +86,9 @@ | ||
| 86 | 86 | if ( ! is_array( $server_type ) ) { |
| 87 | 87 | $server_type = array(); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - if ( isset( $server_type[ $url ] ) && ! empty( $server_type[ $url ] ) ) { | |
| 90 | + if ( isset( $server_type[ $url ] ) && is_string( $server_type[ $url ] ) && '' !== $server_type[ $url ] ) { | |
| 91 | 91 | return strtolower( $server_type[ $url ] ); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | // Url should end with php. |