Skip to content

Commit 390088b

Browse files
authored
Remove detection of unsupported Windows versions (phpGH-15399)
Windows 2008 and Vista are no longer supported as of PHP 7.2.0, and Windows 2008 R2 and Windows 7 are no longer supported as of PHP 8.3.0. Therefore we remove the respective detection code, and assert that these versions can no longer be used.
1 parent d2810f5 commit 390088b

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

ext/standard/info.c

+2-13
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,8 @@ static char* php_get_windows_name()
296296
}
297297
} else if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion >= 6) {
298298
if (osvi.dwMajorVersion == 6) {
299-
if (osvi.dwMinorVersion == 0) {
300-
if (osvi.wProductType == VER_NT_WORKSTATION) {
301-
major = "Windows Vista";
302-
} else {
303-
major = "Windows Server 2008";
304-
}
305-
} else if (osvi.dwMinorVersion == 1) {
306-
if (osvi.wProductType == VER_NT_WORKSTATION) {
307-
major = "Windows 7";
308-
} else {
309-
major = "Windows Server 2008 R2";
310-
}
311-
} else if (osvi.dwMinorVersion == 2) {
299+
ZEND_ASSERT(osvi.dwMinorVersion >= 2);
300+
if (osvi.dwMinorVersion == 2) {
312301
/* could be Windows 8/Windows Server 2012, could be Windows 8.1/Windows Server 2012 R2 */
313302
/* XXX and one more X - the above comment is true if no manifest is used for two cases:
314303
- if the PHP build doesn't use the correct manifest

0 commit comments

Comments
 (0)