Make WordPress Core

Ticket #63625: esc_url-php8-safety.patch

File esc_url-php8-safety.patch, 323 bytes (added by alexanderkoledov, 8 months ago)
Line 
1diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
2index 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 );