diff --git a/ext/standard/head.c b/ext/standard/head.c index 34d59454f09..3c91f228b79 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -157,11 +157,11 @@ PHP_FUNCTION(setcookie) efree(encoded_value); } - if (z_path && Z_STRVAL_PP(z_path) && Z_STRLEN_PP(z_path)>0) { + if (z_path && Z_STRLEN_PP(z_path)>0) { strcat(cookie, "; path="); strcat(cookie, Z_STRVAL_PP(z_path)); } - if (z_domain && Z_STRVAL_PP(z_domain) && Z_STRLEN_PP(z_domain)>0) { + if (z_domain && Z_STRLEN_PP(z_domain)>0) { strcat(cookie, "; domain="); strcat(cookie, Z_STRVAL_PP(z_domain)); }