Skip to content

Commit 3c58f69

Browse files
author
Sascha Schumann
committed
Print NOTICE upon session_start being called while another session is
active
1 parent 61dbfa7 commit 3c58f69

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/session/session.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,8 +1061,10 @@ PHPAPI void php_session_start(TSRMLS_D)
10611061

10621062
PS(define_sid) = 1;
10631063
PS(send_cookie) = 1;
1064-
if (PS(session_status) != php_session_none)
1064+
if (PS(session_status) != php_session_none) {
1065+
php_error(E_NOTICE, "A session had already been started - ignoring session_start()");
10651066
return;
1067+
}
10661068

10671069
lensess = strlen(PS(session_name));
10681070

0 commit comments

Comments
 (0)