[wp-trac] [WordPress Trac] #63656: get_page_by_path $post_type supports string and array but the check in the loop is checking by string

WordPress Trac noreply at wordpress.org
Tue Sep 16 13:07:13 UTC 2025


#63656: get_page_by_path $post_type supports string and array but the check in the
loop is checking by string
-------------------------------------------------+-------------------------
 Reporter:  salimali                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Posts, Post Types                    |     Version:  6.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing reporter-    |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by mindctrl):

 * keywords:  has-patch needs-testing => has-patch needs-testing reporter-
     feedback


Comment:

 @salimali thanks for the report. Can you provide steps on how you
 encountered the PHP notices? The attached PR looks correct, but I'd like
 to understand how the error is/was triggered in WP.

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


More information about the wp-trac mailing list