Support » Plugin: Default Post Date and Time » Lots of warning / errors when run as WPCLI

  • dahousecatz

    (@dahousecatz)


    When the code in default_post_datetime_hook() is run as part of a WPCLI request there are lots of lots of PHP warnings / errors.

    I don’t think there is any need for the code here to be run during WPCLI requests so simply adding:

    // Don't run when called via WP CLI
    if ( defined( 'WP_CLI' ) && WP_CLI ) {
        return $data;
    }

    Should be sufficient.

  • The topic ‘Lots of warning / errors when run as WPCLI’ is closed to new replies.