| @@ -59,9 +59,10 @@ | ||
| 59 | 59 | * @param string $http_ip_header HTTP header for identifying client's IP. |
| 60 | 60 | * |
| 61 | 61 | * @since 4.5.1 |
| 62 | 62 | */ |
| 63 | - $http_ip_header = (string) apply_filters( 'wpdef_firewall_ip_detection', $this->http_ip_header ); | |
| 63 | + $http_ip_header = apply_filters( 'wpdef_firewall_ip_detection', $this->http_ip_header ); | |
| 64 | + $http_ip_header = is_string( $http_ip_header ) ? $http_ip_header : (string) $http_ip_header; | |
| 64 | 65 | switch ( $http_ip_header ) { |
| 65 | 66 | case 'HTTP_X_FORWARDED_FOR': |
| 66 | 67 | case 'HTTP_X_REAL_IP': |
| 67 | 68 | case 'HTTP_CF_CONNECTING_IP': |