We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e2bbc4 commit 0b8fbacCopy full SHA for 0b8fbac
ext/standard/info.c
@@ -680,13 +680,12 @@ PHPAPI zend_string *php_get_uname(char mode)
680
} else if (mode == 'v') {
681
char *winver = php_get_windows_name();
682
dwBuild = (DWORD)(HIWORD(dwVersion));
683
- if (winver == NULL) {
684
- return strpprintf(0, "build %d", dwBuild);
685
- } else {
686
- zend_string *build_with_version = strpprintf(0, "build %d (%s)", dwBuild, winver);
687
- efree(winver);
688
- return build_with_version;
689
- }
+
+ ZEND_ASSERT(winver != NULL);
+ zend_string *build_with_version = strpprintf(0, "build %d (%s)", dwBuild, winver);
+ efree(winver);
+ return build_with_version;
690
} else if (mode == 'm') {
691
php_get_windows_cpu(tmp_uname, sizeof(tmp_uname));
692
php_uname = tmp_uname;
0 commit comments