• Resolved realj42

    (@realj42)


    I am seeing multiple warnings when using Reveal IDs with PHP 8.1 ( and WP_DEBUG set) as follows:

    ( ! ) Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /application/public/wp-includes/functions.php on line 7022
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0169	372872	{main}( )	.../plugins.php:0
    2	0.0684	380296	require_once( '/application/public/wp-admin/admin.php )	.../plugins.php:10
    3	0.0684	381088	require_once( '/application/public/wp-load.php )	.../admin.php:34
    4	0.0686	382040	require_once( '/application/public/wp-config.php )	.../wp-load.php:50
    5	0.0686	391128	require_once( '/application/public/wp-settings.php )	.../wp-config.php:101
    6	0.1700	5430512	include_once( '/application/public/wp-content/plugins/reveal-ids-for-wp-admin-25/reveal-ids-for-wp-admin-25.php )	.../wp-settings.php:447
    7	0.1700	5430616	plugins_url( $path = NULL, $plugin = '/application/public/wp-content/plugins/reveal-ids-for-wp-admin-25/reveal-ids-for-wp-admin-25.php' )	.../reveal-ids-for-wp-admin-25.php:50
    8	0.1700	5430616	wp_normalize_path( $path = NULL )	.../link-template.php:3564
    9	0.1700	5430616	wp_is_stream( $path = NULL )	.../functions.php:2155
    10	0.1700	5430616	strpos( $haystack = NULL, $needle = '://' )	.../functions.php:7022

    Just changing the null parameter to ”, on line 50 of reveal-ids-for-wp-admin-25.php, fixes this for me.

  • The topic ‘‘Deprecated’ warnings when running with PHP 8.1’ is closed to new replies.