Skip to content

Commit 2a802b1

Browse files
committed
early return without nestings
1 parent 3d9ad43 commit 2a802b1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

main/SAPI.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,13 +1007,13 @@ SAPI_API zend_stat_t *sapi_get_stat(void)
10071007

10081008
SAPI_API char *sapi_getenv(const char *name, size_t name_len)
10091009
{
1010-
char *value = NULL, *tmp;
1010+
char *value, *tmp;
10111011

1012-
if (!strncasecmp(name, "HTTP_PROXY", name_len)) {
1013-
/* Ugly fix for HTTP_PROXY issue, see bug #72573 */
1012+
if (!sapi_module.getenv) {
10141013
return NULL;
10151014
}
1016-
if (!sapi_module.getenv) {
1015+
if (!strncasecmp(name, "HTTP_PROXY", name_len)) {
1016+
/* Ugly fix for HTTP_PROXY issue, see bug #72573 */
10171017
return NULL;
10181018
}
10191019
tmp = sapi_module.getenv(name, name_len);
@@ -1027,7 +1027,7 @@ SAPI_API char *sapi_getenv(const char *name, size_t name_len)
10271027
free(tmp);
10281028
}
10291029
#endif
1030-
if (value && sapi_module.input_filter) {
1030+
if (sapi_module.input_filter) {
10311031
sapi_module.input_filter(PARSE_STRING, name, &value, strlen(value), NULL);
10321032
}
10331033
return value;

0 commit comments

Comments
 (0)