Getting warning when launching some wp CLI commands…
-
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 256Reading the code, you can see line 255 that function
get_notice_keysis 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]
The topic ‘Getting warning when launching some wp CLI commands…’ is closed to new replies.