Fix PHP 8.1 strlen(NULL) errors running `bin/lock log`
Summary: Ref T15064
Test Plan:
- Run `bin/lock log --enable` and `bin/lock log --disable`
- Run `bin/lock log` with no args
See deprecation warnings without this patch for all three commands and no deprecation warnings with this patch
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15064
Differential Revision: https://we.phorge.it/D26601