• Resolved Mikko Saari

    (@msaari)


    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

    (@brechtvds)

    Thanks for letting me know! Will include the fix in the next plugin update.

    Plugin Author Brecht

    (@brechtvds)

    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.