Skip to content

Commit 137e963

Browse files
committed
early return
1 parent e0a72f3 commit 137e963

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main/SAPI.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,15 +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-
var value = NULL;
1011-
10121010
/* gate: see bug #72573 */
10131011
if (strncasecmp(name, "HTTP_PROXY", name_len)) {
10141012
if (sapi_module.getenv) {
10151013
char *tmp = sapi_module.getenv(name, name_len);
10161014

10171015
if (tmp) {
1018-
value = estrdup(tmp);
1016+
char *value = estrdup(tmp);
10191017
#ifdef PHP_WIN32
10201018
if (strlen(sapi_module.name) == sizeof("cgi-fcgi") - 1 && !strcmp(sapi_module.name, "cgi-fcgi")) {
10211019
/* XXX more modules to go, if needed. */
@@ -1025,10 +1023,12 @@ SAPI_API char *sapi_getenv(const char *name, size_t name_len)
10251023
if (value && sapi_module.input_filter) {
10261024
sapi_module.input_filter(PARSE_STRING, name, &value, strlen(value), NULL);
10271025
}
1026+
1027+
return value;
10281028
}
10291029
}
10301030
}
1031-
return value;
1031+
return NULL;
10321032
}
10331033

10341034
SAPI_API int sapi_get_fd(int *fd)

0 commit comments

Comments
 (0)