xref: /PHP-7.2/ext/session/tests/bug66481.phpt (revision 935b5cb1)
1--TEST--
2Bug #66481: Calls to session_name() segfault when session.name is null.
3--INI--
4session.name=
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--FILE--
8<?php
9ob_start();
10
11var_dump(session_name("foo"));
12var_dump(session_name("bar"));
13--EXPECTF--
14PHP Warning:  PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0
15
16Warning: PHP Startup: session.name cannot be a numeric or empty '' in Unknown on line 0
17string(9) "PHPSESSID"
18string(3) "foo"
19