-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new test to check new deprecations
- Loading branch information
1 parent
dc6cb3d
commit c051248
Showing
1 changed file
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--TEST-- | ||
Setting deprecated values directly in session_start() | ||
--EXTENSIONS-- | ||
session | ||
--SKIPIF-- | ||
<?php include 'skipif.inc'; ?> | ||
--INI-- | ||
session.use_cookies=0 | ||
session.use_only_cookies=1 | ||
session.use_trans_sid=0 | ||
--FILE-- | ||
<?php | ||
|
||
// Expecting no deprecation here | ||
ini_set("session.use_only_cookie", "1"); | ||
|
||
// Expecting deprecation here | ||
session_start([ 'use_cookies' => '0', 'use_only_cookies' => '0', 'use_trans_sid' => '1']); | ||
?> | ||
--EXPECTF-- | ||
Deprecated: session_start(): Disabling session.use_only_cookies INI setting is deprecated in %s on line 7 | ||
|
||
Warning: session_start(): Session ini settings cannot be changed after headers have already been sent in %s on line 7 | ||
|
||
Warning: session_start(): Setting option "use_trans_sid" failed in %s on line 7 | ||
|
||
Warning: session_start(): Session cache limiter cannot be sent after headers have already been sent (output started at %s:7) in %s on line 7 |