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. git-svn-id: https://develop.svn.wordpress.org/trunk@49186 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2c25a1a0ca
commit
918bebfe3c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user