Deprecation errors with PHP 8
-
WP Recipe Maker causes deprecation errors with PHP 8. The problem is this:
add_submenu_page( null, __( 'Import Recipes', 'wp-recipe-maker' ), __( 'Import Recipes', 'wp-recipe-maker' ), WPRM_Settings::get( 'features_import_access' ), 'wprm_import', array( __CLASS__, 'import_page_template' ) ); add_submenu_page( null, __( 'Search Recipes', 'wp-recipe-maker' ), __( 'Search Recipes', 'wp-recipe-maker' ), WPRM_Settings::get( 'features_import_access' ), 'wprm_import_search', array( __CLASS__, 'import_search_page_template' ) ); add_submenu_page( null, __( 'Importing Recipes', 'wp-recipe-maker' ), __( 'Importing Recipes', 'wp-recipe-maker' ), WPRM_Settings::get( 'features_import_access' ), 'wprm_importing', array( __CLASS__, 'importing_recipes' ) );
Using
null
as the first parameter foradd_submenu_page()
causes deprecation warnings with PHP 8 asstrpos()
andstr_replace()
no longer accept null values. You can replace the null values with empty strings to eliminate the warnings.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Deprecation errors with PHP 8’ is closed to new replies.