Title: Deprecation errors with PHP 8
Last modified: November 28, 2022

---

# Deprecation errors with PHP 8

 *  Resolved [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/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 for `add_submenu_page()` causes deprecation
   warnings with PHP 8 as `strpos()` and `str_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)

 *  Plugin Author [Brecht](https://wordpress.org/support/users/brechtvds/)
 * (@brechtvds)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/deprecation-errors-with-php-8/#post-16239796)
 * Thanks for letting me know! Will include the fix in the next plugin update.
 *  Plugin Author [Brecht](https://wordpress.org/support/users/brechtvds/)
 * (@brechtvds)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/deprecation-errors-with-php-8/#post-16291810)
 * Hi again,
 * I wanted to let you know we just released WP Recipe Maker 8.6.1 which includes
   a fix for these deprecation warnings. Thanks again for bringing this to my attention!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Deprecation errors with PHP 8’ is closed to new replies.

 * ![](https://ps.w.org/wp-recipe-maker/assets/icon-256x256.png?rev=2967063)
 * [WP Recipe Maker](https://wordpress.org/plugins/wp-recipe-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-recipe-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-recipe-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-recipe-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-recipe-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-recipe-maker/reviews/)

## Tags

 * [php 8](https://wordpress.org/support/topic-tag/php-8/)

 * 2 replies
 * 2 participants
 * Last reply from: [Brecht](https://wordpress.org/support/users/brechtvds/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/deprecation-errors-with-php-8/#post-16291810)
 * Status: resolved