]> granicus.if.org Git - php/commitdiff
Fix configure error
authorPeter Kokot <peterkokot@gmail.com>
Thu, 15 Jun 2017 00:30:39 +0000 (02:30 +0200)
committerJoe Watkins <krakjoe@php.net>
Thu, 22 Jun 2017 13:01:18 +0000 (14:01 +0100)
This patch fixes configure error on some systems such as Alpine.

```
 line 3472: test: =: unary operator expected
```

One of the fixes has been suggested also here already:
https://bugs.php.net/bug.php?id=39835

Thank you for considering merging this.

NEWS
acinclude.m4

diff --git a/NEWS b/NEWS
index 75da8063fe7c5064417cdf06240fcb77773dcbf9..6b84bde522257593804dc96ff243cf32a93a6d96 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PHP                                                                        NEWS
 - Core:
   . Fixed bug #74780 (parse_url() borken when query string contains colon). 
     (jhdxr)
+  . Fixed bug #74761 (Unary operator expected error on some systems). (petk)
 
 - SPL:
   . Fixed bug #73471 (PHP freezes with AppendIterator). (jhdxr)
index 36bd1c22e5817e65107efe3fc3e9cebe6237071d..f5e0efa72944bda4c0798f067ee690c650793672 100644 (file)
@@ -2687,7 +2687,7 @@ EOF
   done
 
   echo "'[$]0' \\" >> $1
-  if test `expr -- [$]0 : "'.*"` = 0; then
+  if test `expr " [$]0" : " '.*"` = 0; then
     CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
   else 
     CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"