[wp-trac] [WordPress Trac] #60982: warnings with php 8.1

WordPress Trac noreply at wordpress.org
Thu Apr 11 14:25:23 UTC 2024


#60982: warnings with php 8.1
-------------------------------------+------------------------------
 Reporter:  yus0                     |       Owner:  (none)
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  General                  |     Version:
 Severity:  normal                   |  Resolution:  invalid
 Keywords:  php81 reporter-feedback  |     Focuses:
-------------------------------------+------------------------------
Changes (by yus0):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 I backtraced warnings, all of them are caused by passing null as
 $parent_slug into the "add_submenu_page" function. It didn't caused any
 warnings for years, now it treated by replacing null value with a single
 space character (empty string still causes warnings because of
 "get_admin_page_title" returns null).

 You are right that suggested changes just hides the problem, that can
 cause critical errors after adding types declaration for fuctions
 parameters (I hope it will be done soon or late).

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


More information about the wp-trac mailing list