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
This commit is contained in:
parent
e2d191f710
commit
5892cd545e
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue