- No need for extra strlen() call here

This commit is contained in:
foobar 2005-11-23 15:51:45 +00:00
parent 754d011d8d
commit 1b716123f2

View File

@ -382,7 +382,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int
}
efree(*val);
if (Z_STRLEN(new_var)) {
*val = estrdup(Z_STRVAL(new_var));
*val = estrndup(Z_STRVAL(new_var), Z_STRLEN(new_var) + 1);
zval_dtor(&new_var);
} else {
*val = estrdup("");