[wp-trac] [WordPress Trac] #50913: PHP 8.0: various compatibility fixes

WordPress Trac noreply at wordpress.org
Wed Sep 9 03:54:06 UTC 2020


#50913: PHP 8.0: various compatibility fixes
----------------------------+-------------------------------
 Reporter:  jrf             |       Owner:  SergeyBiryukov
     Type:  task (blessed)  |      Status:  reviewing
 Priority:  normal          |   Milestone:  5.6
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  php8 has-patch  |     Focuses:  coding-standards
----------------------------+-------------------------------

Comment (by SergeyBiryukov):

 In [changeset:"48961" 48961]:
 {{{
 #!CommitTicketReference repository="" revision="48961"
 Code Modernization: Remove unnecessary reference sign from `get_comment()`
 definition.

 This fixes a PHP 8 "argument must be passed by reference, value given"
 error when using `array_map( 'get_comment', ... )`.

 Object variables in PHP 5+ contain a reference to the object, and it's the
 reference that's passed around.

 Note: This reverts [48838], which is now redundant.

 Follow-up to a similar change for `get_post()` in [21572].

 See #50913.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50913#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list