#57974 closed defect (bug) (duplicate)
PHP 8.2 Warning preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated nav-menus.php
Reported by: | ipajen | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | php81 |
Focuses: | Cc: |
Description (last modified by )
Bug Report
Description
When using a theme that use /wp-admin/nav-menus.php following PHP warning is given:
preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated wp-admin/includes/plugin.php:2088 preg_replace() wp-admin/includes/plugin.php:2088 get_plugin_page_hookname() wp-admin/includes/plugin.php:2052 get_plugin_page_hook() wp-admin/includes/plugin.php:1976 get_admin_page_title() wp-admin/admin-header.php:35
Environment
- WordPress: 6.2-RC3
- PHP: 8.2.0
- Server: Apache/2.4.54 (Win64) OpenSSL/1.1.1p PHP/8.2.0
- Database: mysqli (Server: 10.4.27-MariaDB / Client: mysqlnd 8.2.0)
- Browser: Edge 111.0.1661.44 (Windows 10/11)
- Theme: GeneratePress 3.3.0
- MU-Plugins:
- WordPress automation by Installatron
- Plugins:
- Git Updater 12.1.3
- Plugin Compatibility Checker 1.9
- Plugin Dependencies 1.7.8
- Query Monitor 3.12.0
- Restaurant Menu 2.4.2
- WordPress Beta Tester 3.3.5
Steps to Reproduce
- Enable DEBUG
- Use a theme that use /wp-admin/nav-menus.php and go there.
- Bug occurs.
Expected Results
- No PHP warning.
Actual Results
- PHP warning is shown.
Note:
Ticket at Generatepress theme: https://generatepress.com/forums/topic/php-8-1-deprecated-warning-preg_replace/
Tried "Twenty Twenty-Three Version: 1.1" but it gives "with Your theme does not support navigation menus or widgets."
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi @ipajen, thanks for opening this ticket.
This has been fixed in #57918 and has been milestoned for 6.2.1.