Quote all variables in numeric comparisons for safety
This commit is contained in:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user