-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #74514 5 session functions incorrectly warn when calling in…
… read-only/getter mode
- Loading branch information
Yasuo Ohgaki
committed
Jun 30, 2017
1 parent
66e5dc5
commit a2d7665
Showing
4 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--TEST-- | ||
Bug #74514 5 session functions incorrectly warn when calling in read-only/getter mode. | ||
--SKIPIF-- | ||
<?php | ||
include('skipif.inc'); | ||
?> | ||
--FILE-- | ||
<?php | ||
/* | ||
CLI ignores HTTP headers at all, i.e. does not output any HTTP headers, | ||
but it still uses SG(headers_sent). | ||
CLI works as Web server, so SG(headers_sent) cannot be ignored nor changed. | ||
Therefore, once HTTP header is considered as sent, these functions emits | ||
'headers already sent' errors if they try to set new values. | ||
Older PHPs(<7.2) did not care about this misuse on Web SAPI. | ||
*/ | ||
var_dump(session_name('foo')); | ||
var_dump(session_name()); | ||
var_dump(session_module_name()); | ||
var_dump(session_save_path()); | ||
var_dump(session_cache_limiter()); | ||
var_dump(session_cache_expire()); | ||
?> | ||
===DONE=== | ||
--EXPECT-- | ||
string(9) "PHPSESSID" | ||
string(3) "foo" | ||
string(5) "files" | ||
string(0) "" | ||
string(7) "nocache" | ||
int(180) | ||
===DONE=== |