summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-10-03 15:10:36 +0000
committerSascha Schumann <sas@php.net>2002-10-03 15:10:36 +0000
commit7e03310a6ad2362ea190d09843511602b68ce4f2 (patch)
treef55dca8a749315771438f7a8cf09b4a21b362124 /ext/session
parent2ea2b662a4114292981e8c235067759219b33408 (diff)
downloadphp-git-7e03310a6ad2362ea190d09843511602b68ce4f2.tar.gz
Don't emit warning, if there is nothing to send
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/session.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 01a073b5c6..756c44823b 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -790,6 +790,8 @@ static int php_session_cache_limiter(TSRMLS_D)
{
php_session_cache_limiter_t *lim;
+ if (PS(cache_limiter)[0] == '\0') return 0;
+
if (SG(headers_sent)) {
char *output_start_filename = php_get_output_start_filename(TSRMLS_C);
int output_start_lineno = php_get_output_start_lineno(TSRMLS_C);
@@ -800,17 +802,17 @@ static int php_session_cache_limiter(TSRMLS_D)
} else {
php_error(E_WARNING, "Cannot send session cache limiter - headers already sent");
}
- return (-2);
+ return -2;
}
for (lim = php_session_cache_limiters; lim->name; lim++) {
if (!strcasecmp(lim->name, PS(cache_limiter))) {
lim->func(TSRMLS_C);
- return (0);
+ return 0;
}
}
- return (-1);
+ return -1;
}
#define COOKIE_SET_COOKIE "Set-Cookie: "