diff options
author | Ondřej Surý <ondrej@sury.org> | 2015-02-20 10:01:00 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2015-02-20 10:01:00 +0100 |
commit | 347aa01617585e89149414a9763175a19d2dc651 (patch) | |
tree | 98170e6aeca907f029fe7b5abbbd2e7f2f4a5412 /ext/session/tests | |
parent | 832b62efb8fceebb220116d8024d945a9bd31d7e (diff) | |
download | php-upstream.tar.gz |
New upstream version 5.6.6+dfsgupstream
Diffstat (limited to 'ext/session/tests')
-rw-r--r-- | ext/session/tests/bug68063.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/session/tests/bug68063.phpt b/ext/session/tests/bug68063.phpt new file mode 100644 index 000000000..d3da470d0 --- /dev/null +++ b/ext/session/tests/bug68063.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #68063 (Empty session IDs do still start sessions) +--SKIPIF-- +<?php include('skipif.inc'); ?> +--INI-- +--FILE-- +<?php +// Could also be set with a cookie like "PHPSESSID=; path=/" +session_id(''); + +// Will still start the session and return true +var_dump(session_start()); + +// Returns an empty string +var_dump(session_id()); +?> +--EXPECTF-- +Warning: session_start(): Cannot start session with empty session ID in %s on line %d +bool(false) +string(0) "" |