• Hello,

    Using PHP 7.4, when launching some wp CLI commands, I get the following parasite warning :

    Warning: Invalid argument supplied for foreach() in /home/<my_wp_path>/wp-content/plugins/boxtal-connect/Boxtal/BoxtalConnectWoocommerce/notice/class-notice-controller.php on line 256

    Reading the code, you can see line 255 that function get_notice_keys is called (read from line 193). And it may return a void array. PHP 7.4 doesn’t seem to like it.

    Maybe you could add the following check before the foreach :

    if ( ! empty( $notices ) ) {
      foreach ( $notices as $notice_key ) {
        if ( $notice === $notice_key ) {
          return true;
        }
      }
    }

    Thank you

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author boxtal

    (@boxtal)

    Hello,

    Thanks for your feedback.

    We have prepared a fix that will be effective in the next version of Boxtal Connect.

    Best regards,

    Boxtal Team

Viewing 1 replies (of 1 total)
  • The topic ‘Getting warning when launching some wp CLI commands…’ is closed to new replies.