Skip to content

Commit 63a48d5

Browse files
cmb69jmikola
authored andcommitted
Fix config.w32 for PHP 7.4.0
The VS version evaluation has been reworked[1] for PHP 7.4.0, which includes the removal of the VC_VERSIONS array. To avoid the JScript error, we check whether VC_VERSIONS is defined, and otherwise fall back to COMPILER_NAME_LONG. [1] <http://git.php.net/?p=php-src.git;a=commit;h=6a624c1dfda0dbfaaff3e453e6cb58de12748fb3>
1 parent 22979be commit 63a48d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

config.w32

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,10 @@ if (PHP_MONGODB != "no") {
245245

246246
if (typeof COMPILER_NAME === 'string') {
247247
mongoc_opts.MONGOC_CC = COMPILER_NAME;
248-
} else if (typeof VC_VERSIONS[VCVERS] === 'string') {
248+
} else if (typeof VC_VERSIONS === 'array' && typeof VC_VERSIONS[VCVERS] === 'string') {
249249
mongoc_opts.MONGOC_CC = VC_VERSIONS[VCVERS];
250+
} else if (typeof COMPILER_NAME_LONG === 'string') {
251+
mongoc_opts.MONGOC_CC = COMPILER_NAME_LONG;
250252
}
251253

252254
/* MONGOC_USER_SET_CFLAGS and MONGOC_USER_SET_LDFLAGS can be left blank, as we

0 commit comments

Comments
 (0)