Ticket #63625: esc_url-php8-safety.patch
| File esc_url-php8-safety.patch, 323 bytes (added by , 8 months ago) |
|---|
| Line | |
|---|---|
| 1 | diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php |
| 2 | index e8c2341..d1a9cfa 100644 |
| 3 | --- a/wp-includes/formatting.php |
| 4 | +++ b/wp-includes/formatting.php |
| 5 | @@ function esc_url( $url, $protocols = null, $_context = 'display' ) { |
| 6 | + if ( ! is_string( $url ) ) { |
| 7 | + return ''; |
| 8 | + } |
| 9 | + |
| 10 | $url = ltrim( $url ); |