[wp-trac] [WordPress Trac] #49728: [PHP 8] Prepare for the internal functions throwing `TypeError` or `ValueError` exceptions on unexpected types/values

WordPress Trac noreply at wordpress.org
Tue Jan 25 18:06:08 UTC 2022


#49728: [PHP 8] Prepare for the internal functions throwing `TypeError` or
`ValueError` exceptions on unexpected types/values
-------------------------------------------------+-------------------------
 Reporter:  ayeshrajans                          |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.0
Component:  Build/Test Tools                     |     Version:
 Severity:  minor                                |  Resolution:
 Keywords:  needs-patch needs-unit-tests needs-  |     Focuses:
  dev-note needs-codex php8                      |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:16 JavierCasares]:
 > I just update from WordPress 5.8.3 to WordPress 5.9-RC4 (with PHP 8.0)
 and get this error:
 >
 > `PHP message: PHP Fatal error:  Uncaught TypeError:
 call_user_func_array(): Argument #1 ($callback) must be a valid callback,
 function "wp_admin_bar_edit_site_menu" not found or invalid function name`

 Thanks for testing! This sounds like an incomplete upgrade, as the
 function is defined in [source:branches/5.9/src/wp-includes/admin-
 bar.php?rev=52638#L411 wp-includes/admin-bar.php]. It's a new function
 added in [52158] / #54337, so it seems like the file was not fully updated
 on the affected install for some reason.

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


More information about the wp-trac mailing list