Quote all variables in numeric comparisons for safety

This commit is contained in:
cschantz
2025-11-20 15:43:20 -05:00
parent 6b91dedcc9
commit 83e5749cdf
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -509,7 +509,7 @@ if [ -n "$FIRST_WP" ]; then
crontab -u "$WP_USER" -l 2>/dev/null | head -10 >> "$RESULTS_FILE"
else
CRON_ERR=$?
if [ $CRON_ERR -eq 1 ]; then
if [ "$CRON_ERR" -eq 1 ]; then
test_info "User $WP_USER has no crontab (OK - means empty)"
else
test_warn "Cannot read crontab for $WP_USER (exit code: $CRON_ERR)"
@@ -791,7 +791,7 @@ TOTAL TESTS: $TOTAL
Completed: $(date)
EOF
if [ $FAIL -eq 0 ]; then
if [ "$FAIL" -eq 0 ]; then
echo -e "${GREEN}✓ ALL CRITICAL TESTS PASSED${NC}"
echo "✓ ALL CRITICAL TESTS PASSED" >> "$RESULTS_FILE"
echo ""