From bf945a81ec1165ae3116e9aa1ef337785d6e6b6a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 29 Sep 2020 10:01:05 +0000 Subject: [PATCH] Code Modernization: Remove a single trailing percent sign before calling `sprintf()` on the `$default` parameter in `get_theme_mod()`. This avoids a "Missing format specifier at end of string" fatal error on PHP 8, and maintains the current behaviour. See #50913. git-svn-id: https://develop.svn.wordpress.org/trunk@49068 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/theme.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 93008dd567..5fa7a23146 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -1024,6 +1024,8 @@ function get_theme_mod( $name, $default = false ) { if ( is_string( $default ) ) { // Only run the replacement if an sprintf() string format pattern was found. if ( preg_match( '#(?