xref: /PHP-8.0/ext/session/tests/bug50308.phpt (revision a53a6b3f)
1--TEST--
2Bug #50308 (session id not appended properly for empty anchor tags)
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.name=PHPSESSID
7session.save_handler=files
8session.use_trans_sid=1
9session.use_only_cookies=0
10--FILE--
11<?php
12@session_start();
13?>
14<a href=""/>
15<a href="" />
16<a href="foo"/>
17<a href="foo" />
18<a href=foo/>
19<a href="/">
20<a href=/>
21<a href=?foo=bar/>
22<a href="?foo=bar"/>
23<a href=./>
24<a href="./">
25--EXPECTF--
26<a href="?PHPSESSID=%s"/>
27<a href="?PHPSESSID=%s" />
28<a href="foo?PHPSESSID=%s"/>
29<a href="foo?PHPSESSID=%s" />
30<a href=foo/?PHPSESSID=%s>
31<a href="/?PHPSESSID=%s">
32<a href=/?PHPSESSID=%s>
33<a href=?foo=bar/&PHPSESSID=%s>
34<a href="?foo=bar&PHPSESSID=%s"/>
35<a href=./?PHPSESSID=%s>
36<a href="./?PHPSESSID=%s">
37