mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Code Modernization: Rename parameters that use reserved keywords in phpunit/tests/media.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names. This commit renames the `$match` parameter to `$matches` in shortcode image tests. Note: This is enforced by WPCS 3.0.0. Follow-up to [56693]. See #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -5162,8 +5162,8 @@ EOF;
|
||||
array( '', '<img fetchpriority="high" ' ),
|
||||
preg_replace_callback(
|
||||
'/gallery-(\d+)/',
|
||||
static function ( $match ) {
|
||||
return 'gallery-' . ( (int) $match[1] + 1 );
|
||||
static function ( $matches ) {
|
||||
return 'gallery-' . ( (int) $matches[1] + 1 );
|
||||
},
|
||||
do_shortcode( '[gallery ids="' . self::$large_id . '" size="large" id="' . $post_id . '"]' )
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user