-
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.
Fix GH-16385: Unexpected null returned by session_set_cookie_params
Two issues: 1) The check happened before ZPP checks 2) The `return;` statement caused NULL to be returned while this function can only return booleans. An exception seems not acceptable in stable versions, but a warning may do. Closes GH-16386.
- Loading branch information
Showing
3 changed files
with
22 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--TEST-- | ||
GH-16385 (Unexpected null returned by session_set_cookie_params) | ||
--EXTENSIONS-- | ||
session | ||
--INI-- | ||
session.use_cookies=0 | ||
--FILE-- | ||
<?php | ||
var_dump(session_set_cookie_params(3600, "/foo")); | ||
?> | ||
--EXPECTF-- | ||
Warning: session_set_cookie_params(): Session cookies cannot be used when session.use_cookies is disabled in %s on line %d | ||
bool(false) |