From d55618e69c9fbccbbf79564cbbc74e6b8bf7bb88 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 3 Jan 2019 18:55:00 +0000 Subject: [PATCH] Customize: Pass missing parameter to `dynamic option_{$option}` filter in `WP_Customize_Widgets::capture_filter_pre_get_option()`. This prevents a potential fatal error from an `ArgumentCountError` exception in PHP 7.1 or greater Props dlh. Merges [43561] to the 5.0 branch. Fixes #44770. git-svn-id: https://develop.svn.wordpress.org/branches/5.0@44387 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index a54794b06d..9df14c0f2f 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -1953,7 +1953,7 @@ final class WP_Customize_Widgets { $value = $this->_captured_options[ $option_name ]; /** This filter is documented in wp-includes/option.php */ - $value = apply_filters( 'option_' . $option_name, $value ); + $value = apply_filters( 'option_' . $option_name, $value, $option_name ); } return $value;