[wp-trac] [WordPress Trac] #54736: get_sample_permalink unsets $post->filter even though this is a public property.

WordPress Trac noreply at wordpress.org
Tue Jan 4 13:02:10 UTC 2022


#54736: get_sample_permalink unsets $post->filter even though this is a public
property.
----------------------------------------+---------------------
 Reporter:  herregroen                  |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  6.0
Component:  Posts, Post Types           |     Version:  2.7.1
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+---------------------
Changes (by hellofromTonya):

 * keywords:   => has-patch needs-unit-tests
 * version:  trunk => 2.7.1
 * component:  General => Posts, Post Types
 * milestone:  Awaiting Review => 6.0


Comment:

 Hello @herregroen,

 Welcome back to WordPress Core's Trac! Thanks for opening this ticket :)

 The `unset( $post->filter )` was introduced in #8526 [10213].

 Here's an example in action https://3v4l.org/66Nvl.

 * In < PHP 8, it throws a `Notice: Undefined property: WP_Post::$filter`.
 * In PHP 8, it throws a `Warning: Undefined property: WP_Post::$filter`.

 Moving this ticket into 6.0.

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


More information about the wp-trac mailing list