Skip to content

Commit afa509f

Browse files
committed
Make condition checking consistent
1 parent c1c5093 commit afa509f

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

build_scripts/php-fb-build.bat

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if('php-'.PHP_VERSION != '%pfb_php_tag%'){ printf(\"Version mismatch: expected '
3434
if((int)ZEND_THREAD_SAFE != %vb_ts%){ printf(\"Thread Safety mismatch: expected %vb_ts%, but got %%d \n\", ZEND_THREAD_SAFE); exit(1); }^
3535
if((PHP_INT_SIZE == 8 ? 'x64' : 'x86') != '%vb_arch%'){ printf(\"Architecture mismatch: expected '%vb_arch%', but got '%%s' \n\", (PHP_INT_SIZE == 8 ? 'x64' : 'x86')); exit(1); }
3636

37-
if %vb_arch% EQU x86 (
37+
if "%vb_arch%" == "x86" (
3838
set vb_libs=%PFB_FB32_DIR%
3939
) else (
4040
set vb_libs=%PFB_FB64_DIR%
@@ -55,13 +55,13 @@ exit /B
5555
set pfb_php_tag=%1
5656
set pfb_cpp_vers=%2
5757

58-
if [%pfb_php_tag%] == [] (
58+
if "%pfb_php_tag%" == "" (
5959
call :usage
6060
echo pfb_php_tag varible not set
6161
exit 1
6262
)
6363

64-
if [%pfb_cpp_vers%] == [] (
64+
if "%pfb_cpp_vers%" == "" (
6565
call :usage
6666
echo pfb_cpp_vers varible not set
6767
exit 1
@@ -70,7 +70,7 @@ if [%pfb_cpp_vers%] == [] (
7070
@REM Convert php-8.4.13 -> 8.4
7171
for /f "tokens=2,3 delims=-." %%a in ("%pfb_php_tag%") do set pfb_php_vers=%%a.%%b
7272

73-
if [%pfb_php_vers%] == [] (
73+
if "%pfb_php_vers%" == "" (
7474
echo BUG: pfb_php_vers should be set at this point
7575
exit 1
7676
)
@@ -80,12 +80,12 @@ set pfb_build_root=php%pfb_php_vers%\%pfb_cpp_vers%\
8080
(for %%a in (x64 x86) do (
8181
set pfb_arch=%%a
8282

83-
if not exist %pfb_build_root%\%%a\php-src\.git\ (
83+
if not exist "%pfb_build_root%\%%a\php-src\.git\" (
8484
call :log "Cloning %pfb_php_tag% %%a"
8585
call phpsdk-%pfb_cpp_vers%-%%a.bat -t %~dp0php-fb-sdk-init.bat || goto :error
8686
)
8787

88-
if %%a EQU x86 (
88+
if "%%a" == "x86" (
8989
set php_exe_arch=%pfb_build_root%%%a\php-src\
9090
) else (
9191
set php_exe_arch=%pfb_build_root%%%a\php-src\x64\
@@ -94,13 +94,13 @@ set pfb_build_root=php%pfb_php_vers%\%pfb_cpp_vers%\
9494
setlocal enabledelayedexpansion
9595
(for %%t in (0 1) do (
9696
set pfb_ts=%%t
97-
if %%t EQU 1 (
97+
if "%%t" equ "1" (
9898
set php_exe="!php_exe_arch!Release_TS\php.exe"
9999
) else (
100100
set php_exe="!php_exe_arch!Release\php.exe"
101101
)
102102

103-
if [!php_exe!] == [] (
103+
if "!php_exe!" == "" (
104104
echo BUG: php_exe should be set at this point
105105
exit 1
106106
)

build_scripts/php-fb-sdk-build.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ goto :MAIN
2525
exit /B
2626

2727
:MAIN
28-
if [%pfb_php_vers%] == [] (
28+
if "%pfb_php_vers%" == "" (
2929
echo pfb_php_vers varible not set
3030
exit 1
3131
)
@@ -40,7 +40,7 @@ exit /B
4040
set extra_args=
4141
)
4242

43-
if %pfb_arch% EQU x86 (
43+
if "%pfb_arch%" == "x86" (
4444
set with_interbase="shared,%PFB_FB32_DIR%"
4545
set build_msg=%build_msg% x86
4646
) else (

build_scripts/php-fb-sdk-init.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
@REM Example: pfb_php_tag=7.4.13
88
@REM Example: pfb_php_vers=7.4
99

10-
if [%pfb_php_vers%] == [] (
10+
if "%pfb_php_vers%" == "" (
1111
echo pfb_php_vers varible not set
1212
exit 1
1313
)
1414

15-
if [%pfb_php_tag%] == [] (
15+
if "%pfb_php_tag%" == "" (
1616
echo pfb_php_tag varible not set
1717
exit 1
1818
)

0 commit comments

Comments
 (0)