Ensures the $assoc_args array is not empty before attempting to reference it. This fixes the following PHP warning that appears when running wp vuln status with no arguments.
PHP Warning: Array to string conversion in /var/www/wpclean.local/wp-content/plugins/wpcli-vulnerability-scanner/wpcli-vulnerability-scanner.php on line 124
Verified by running with and without arguments before making the change, then repeating after making the change.
Description of the Change
Ensures the
$assoc_args
array is not empty before attempting to reference it. This fixes the following PHP warning that appears when runningwp vuln status
with no arguments.PHP Warning: Array to string conversion in /var/www/wpclean.local/wp-content/plugins/wpcli-vulnerability-scanner/wpcli-vulnerability-scanner.php on line 124
Verified by running with and without arguments before making the change, then repeating after making the change.
Closes #87
How to test the Change
wp vuln status
wp vuln status
Changelog Entry
Credits
Props @ruscoe
Checklist: