• Hi,

    This plugin causes lots of PHP warnings when using the WP-CLI:

    PHP Warning: Constant DB_NAME already defined in [...]/public/wp-config.php on line 25
    Warning: Constant DB_NAME already defined in [...]/public/wp-config.php on line 25
    PHP Warning: Constant DB_USER already defined in [...]/public/wp-config.php on line 28
    Warning: Constant DB_USER already defined in [...]/public/wp-config.php on line 28
    PHP Warning: Constant DB_PASSWORD already defined in [...]/public/wp-config.php on line 31
    Warning: Constant DB_PASSWORD already defined in [...]/public/wp-config.php on line 31
    PHP Warning: Constant DB_HOST already defined in [...]/public/wp-config.php on line 34
    Warning: Constant DB_HOST already defined in [...]/public/wp-config.php on line 34
    PHP Warning: Constant DB_CHARSET already defined in [...]/public/wp-config.php on line 37
    Warning: Constant DB_CHARSET already defined in [...]/public/wp-config.php on line 37
    PHP Warning: Constant DB_COLLATE already defined in [...]/public/wp-config.php on line 40
    Warning: Constant DB_COLLATE already defined in [...]/public/wp-config.php on line 40
    PHP Warning: Constant AUTH_KEY already defined in [...]/public/wp-config.php on line 51
    Warning: Constant AUTH_KEY already defined in [...]/public/wp-config.php on line 51
    PHP Warning: Constant SECURE_AUTH_KEY already defined in [...]/public/wp-config.php on line 52
    Warning: Constant SECURE_AUTH_KEY already defined in [...]/public/wp-config.php on line 52
    PHP Warning: Constant LOGGED_IN_KEY already defined in [...]/public/wp-config.php on line 53
    Warning: Constant LOGGED_IN_KEY already defined in [...]/public/wp-config.php on line 53
    PHP Warning: Constant NONCE_KEY already defined in [...]/public/wp-config.php on line 54
    Warning: Constant NONCE_KEY already defined in [...]/public/wp-config.php on line 54
    PHP Warning: Constant AUTH_SALT already defined in [...]/public/wp-config.php on line 55
    Warning: Constant AUTH_SALT already defined in [...]/public/wp-config.php on line 55
    PHP Warning: Constant SECURE_AUTH_SALT already defined in [...]/public/wp-config.php on line 56
    Warning: Constant SECURE_AUTH_SALT already defined in [...]/public/wp-config.php on line 56
    PHP Warning: Constant LOGGED_IN_SALT already defined in [...]/public/wp-config.php on line 57
    Warning: Constant LOGGED_IN_SALT already defined in [...]/public/wp-config.php on line 57
    PHP Warning: Constant NONCE_SALT already defined in [...]/public/wp-config.php on line 58
    Warning: Constant NONCE_SALT already defined in [...]/public/wp-config.php on line 58
    PHP Warning: Constant WP_CACHE_KEY_SALT already defined in [...]/public/wp-config.php on line 59
    Warning: Constant WP_CACHE_KEY_SALT already defined in [...]/public/wp-config.php on line 59

    It looks like the cause of this has already been raised in a previous ticket but I’m not able to join that conversation:

    I believe I have partially figured out what is going on, the /modules/hooks.php file has this code at the top:

    require_once(ABSPATH."/wp-includes/pluggable.php");
    require_once(ABSPATH."/wp-load.php");

    https://www.ads-software.com/support/topic/php-warnings-after-upgrading-to-php-8-2/

    This makes using the WP-CLI very noisy and much harder to use so it should definitely be fixed.

    Thanks

Viewing 1 replies (of 1 total)
  • I’m curious if you figured out the best way to patch this plugin to avoid this problem?

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.