From 5892cd545e441fcf1f8afd39f0e4a6f468d592fd Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 18 Oct 2020 06:29:05 +0000 Subject: [PATCH] Code Modernization: Remove unnecessary reference sign from `PO::export_entry()` definition. This fixes a PHP 8 "argument must be passed by reference, value given" error when using `array_map()` in `PO::export_entries()`. Object variables in PHP 5+ contain a reference to the object, and it's the reference that's passed around. Props jrf. See #50913. Built from https://develop.svn.wordpress.org/trunk@49186 git-svn-id: http://core.svn.wordpress.org/trunk@48948 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pomo/po.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/pomo/po.php b/wp-includes/pomo/po.php index b2a605a3ec..99bb6891b1 100644 --- a/wp-includes/pomo/po.php +++ b/wp-includes/pomo/po.php @@ -212,11 +212,11 @@ if ( ! class_exists( 'PO', false ) ) : /** * Builds a string from the entry for inclusion in PO file * - * @param Translation_Entry $entry the entry to convert to po string (passed by reference). + * @param Translation_Entry $entry the entry to convert to po string. * @return string|false PO-style formatted string for the entry or * false if the entry is empty */ - public static function export_entry( &$entry ) { + public static function export_entry( $entry ) { if ( null === $entry->singular || '' === $entry->singular ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 772b5bb9fa..5e787af5d1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49185'; +$wp_version = '5.6-alpha-49186'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.