[wp-trac] [WordPress Trac] #64643: Remove some obsolete return by refs

WordPress Trac noreply at wordpress.org
Sun Feb 15 18:08:11 UTC 2026


#64643: Remove some obsolete return by refs
------------------------------+----------------------------
 Reporter:  swissspidy        |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Future Release
Component:  General           |    Version:
 Severity:  normal            |   Keywords:  needs-patch
  Focuses:  coding-standards  |
------------------------------+----------------------------
 [21792] / #21839 removed some unnecessary return by reference usage in
 core. However, it did not properly remove the ampersands from the function
 signatures.

 For example, the signature of `wp_get_post_revision` is still `function
 wp_get_post_revision( &$post, $output = OBJECT, $filter = 'raw' )`, which
 messes with static analysis.

 I suggest auditing the usage, starting with the functions touched by that
 commit, and removing the ampersands where possible.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64643>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list