From 8409b5026f92d13f9e87a608849d7333932e52bd Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 29 Jul 2018 21:59:50 +0200 Subject: [PATCH] Fix form element bug --- Hooks/syntax.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh index 6627ed0..8e218cc 100644 --- a/Hooks/syntax.sh +++ b/Hooks/syntax.sh @@ -51,16 +51,16 @@ if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then fi # Input elements must have a type= attribute *error* - if [[ -n $(grep -P '(\)' $FILE) ]]; then + if [[ -n $(grep -P '()' $FILE) ]]; then echo -e "\e[1;31m\tFound missing input type attribute.\e[0m" >&2 - grep -P '(\)' $FILE >&2 + grep -P '()' $FILE >&2 exit 1 fi # Form fields must have a name *error* - if [[ -n $(grep -P '(\)' $FILE) ]]; then + if [[ -n $(grep -P '()' $FILE) ]]; then echo -e "\e[1;31m\tFound missing form element name.\e[0m" >&2 - grep -P '(\)' $FILE >&2 + grep -P '()' $FILE >&2 exit 1 fi