[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 20:22:47 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:
------------------------------+------------------------------
Changes (by ocean90):
* keywords: needs-testing =>
Comment:
This is going to be fun...
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 ] );
> }}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37295#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list