FIX: Add safety to php validation grep (line 1193)

Added || true to validate_php_ini() grep to safely handle set -o pipefail.
When PHP validates successfully (no errors), grep returns 1, which would
cause script exit. Now handled gracefully.
This commit is contained in:
Developer
2026-04-20 22:47:14 -04:00
parent f4c99ed94d
commit e87225e2aa
+3 -2
View File
@@ -1189,8 +1189,9 @@ validate_php_ini() {
return 1 return 1
fi fi
# Use php -i to check for syntax errors (basic validation) # Use php to check for syntax errors (basic validation)
php -d "display_errors=0" -r "return 0;" 2>&1 | grep -q "Parse error\|Fatal error" && return 1 # Add || true to handle grep returning 1 with set -o pipefail
php -d "display_errors=0" -r "return 0;" 2>&1 | grep -q "Parse error\|Fatal error" && return 1 || true
return 0 return 0
} }