diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index e8c2341..d1a9cfa 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ function esc_url( $url, $protocols = null, $_context = 'display' ) {
+   if ( ! is_string( $url ) ) {
+       return '';
+   }
+
    $url = ltrim( $url );
