mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/10760] Catch both versions of parse error output in php.
PHPBB3-10760
This commit is contained in:
parent
a0da2408e7
commit
f2967b6669
1 changed files with 14 additions and 0 deletions
|
@ -92,6 +92,20 @@ unset IFS
|
||||||
if [ $error -eq 1 ]
|
if [ $error -eq 1 ]
|
||||||
then
|
then
|
||||||
echo "PHP Syntax check failed:"
|
echo "PHP Syntax check failed:"
|
||||||
|
# php "display errors" (display_errors php.ini value)
|
||||||
|
# and "log errors" (log_errors php.ini value).
|
||||||
|
# these are independent settings - see main/main.c in php source.
|
||||||
|
# the "log errors" setting produces output which
|
||||||
|
# starts with "PHP Parse error:"; the "display errors"
|
||||||
|
# setting produces output starting with "Parse error:".
|
||||||
|
# if both are turned on php dumps the parse error twice.
|
||||||
|
# therefore here we try to grep for one version and
|
||||||
|
# if that yields no results grep for the other version.
|
||||||
$echo_e "$errors" | grep "^Parse error:"
|
$echo_e "$errors" | grep "^Parse error:"
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
# match failed
|
||||||
|
$echo_e "$errors" | grep "^PHP Parse error:"
|
||||||
|
fi
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue