-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix syntax in lib/Zend/Locale/Data/es_419.xml #1901
Fix syntax in lib/Zend/Locale/Data/es_419.xml #1901
Conversation
Co-authored-by: luigifab <31816829+luigifab@users.noreply.github.com>
anyone knows if this is causing an actual error in any case? |
It's weird because I was only able to reproduce the original issue after changing the locale to |
For me, by changing products quantity in cart, it does not work without initial PR for:
|
With the initial fixed PR, and after removed |
I using this .git/hooks/pre-commit hook to check syntax of php and phtml and xml files for #!/usr/bin/env bash
# sudo aptitude install libxml2-utils
PROJECT=$(php -r "echo dirname(dirname(dirname(realpath('$0'))));")
STAGED_FILES_CMD=$(git diff --cached --name-only --diff-filter=ACMR HEAD | grep '\.php\|\.phtml\|\.xml' )
# Determine if a file list is passed
if [ "$#" -eq 1 ]
then
oIFS=$IFS
IFS='
'
SFILES="$1"
IFS=$oIFS
fi
SFILES=${SFILES:-$STAGED_FILES_CMD}
if [[ $SFILES ]]
then
echo "Checking PHP/PHTML/XML..."
for FILE in $SFILES
do
if [[ $FILE =~ ".xml" ]]
then
xmllint --noout $PROJECT/$FILE
else
php -l $PROJECT/$FILE
fi
if [ $? != 0 ]
then
echo "STOP"
exit 1
fi
FILES="$FILES $PROJECT/$FILE"
done
fi
exit $? It's not perfect, and yes this is only local. |
@luigifab does the additional |
No there are no errors, even if I forgot to close a tag in any line of es_419.xml. |
Ideally all XML files should have tags that close. Otherwise it is not known what could come out of the concatenation of all the files. Most likely Magento ignores the error although we should have known about it. I will do a test in some XML files to see what happens. If anyone knows where to add some code to log the error in a particular XML file it would be perfect. |
I created #1918 as followup to add a detection for this specific error, and xml syntax errors in general. |
Fixes a syntax error introduced in #1896 as spotted by @luigifab
Related Pull Requests
#1896
Contribution checklist (*)