Fix PHP warning when there are no user IDs to keep
JPry opened this issue · comments
Jeremy Pry commented
I ran the following command to eliminate all users from an install:
wp ha -l users=0
For each user that was deleted, the following PHP warning appeared:
Warning: min(): Array must contain at least one element in /home/vagrant/.wp-cli/packages/vendor/ivankruchkoff/wp-hammer/includes/pruners/users.php on line 55
Ivan commented
So I don't know whether or not it's possible to have a site with no users, but if it is as a workaround do wp ha -l users=1
and remove the last user yourself. I'll put out a workaround when I can (PRs are always welcome though)