• Resolved Matthieu

    (@theschappy)


    Hi there,

    With the latest version of PHP 8.1 and WordPress 6.0.2 you might encounter logging of warnings regarding PLUGIN_NAME as follows:
    Constant PLUGIN_NAME already defined in /var/lib/wordpress/wp-content/plugins/404-solution/includes/Loader.php on line 17

    Just as a quick fix:

    --- Loader.php.org      2022-10-06 10:26:59.339522126 +0200
    +++ Loader.php  2022-10-06 10:27:17.963063849 +0200
    @@ -14,7 +14,7 @@
     define( 'URL_TRACKING_SUFFIX', '?utm_source=404SolutionPlugin&utm_medium=WordPress');
     define( 'ABJ404_HOME_URL', 'https://www.ajexperience.com/404-solution/' . URL_TRACKING_SUFFIX);
     define( 'ABJ404_FC_URL', 'https://www.ajexperience.com/' . URL_TRACKING_SUFFIX);
    -define( 'PLUGIN_NAME', '404 Solution');
    +if (!defined('PLUGIN_NAME')) define( 'PLUGIN_NAME', '404 Solution');
    
     // STATUS types
     define( 'ABJ404_TRASH_FILTER', -1 );

    Cheers!

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

The topic ‘PLUGIN_NAME already defined’ is closed to new replies.