[wp-trac] [WordPress Trac] #37295: PHP 7.1.0: Tests_Query_IsTerm::test_cat_uncat_action_tax() is failing

WordPress Trac noreply at wordpress.org
Thu Jul 14 22:54:06 UTC 2016


#37295: PHP 7.1.0: Tests_Query_IsTerm::test_cat_uncat_action_tax() is failing
------------------------------+------------------------------
 Reporter:  ocean90           |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------------------

Comment (by netweb):

 Replying to [comment:8 ocean90]:
 > From the ticket:
 > > PHP-7.1 doesn't allow modification of $this through references on
 purpose.
 > > See https://wiki.php.net/rfc/this_var#disable_ability_to_re-
 assign_this_indirectly_through_reference
 > >
 > > The simplest workaround is replacing $this with another variable.
 > >
 > > {{{
 > > - do_action_ref_array( 'pre_get_posts', [ &$this ] );
 > > + $obj = $this;
 > > + do_action_ref_array( 'pre_get_posts', [ &$obj ] );
 > > }}}

 A new reply to that reply:
 > ... that's a workaround, but it's only a workaround for the bug… the bug
 needs to be fixed somehow though before 7.1.0. I don't find this broken
 behavior acceptable to be shipped in the release.

 Thanks for creating the PHP ticket @ocean90, so at least there is now some
 progress and more fun to come for sure

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


More information about the wp-trac mailing list