]> granicus.if.org Git - php/commitdiff
Fix Bug #74541 Wrong reflection on session_start()
authorFabien Villepinte <fabien.villepinte@gmail.com>
Mon, 8 May 2017 20:42:09 +0000 (22:42 +0200)
committerFabien Villepinte <fabien.villepinte@gmail.com>
Mon, 8 May 2017 20:42:09 +0000 (22:42 +0200)
ext/session/session.c
ext/session/tests/bug74541.phpt [new file with mode: 0644]

index 589d9b2507ce385797c1393cca14db0beff2c300..2c4b30fc2b96e6106ad2032ff63541101b4cf3b6 100644 (file)
@@ -2554,6 +2554,10 @@ ZEND_BEGIN_ARG_INFO(arginfo_session_class_updateTimestamp, 0)
        ZEND_ARG_INFO(0, key)
        ZEND_ARG_INFO(0, val)
 ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_start, 0, 0, 0)
+       ZEND_ARG_INFO(0, options) /* array */
+ZEND_END_ARG_INFO()
 /* }}} */
 
 /* {{{ session_functions[]
@@ -2566,7 +2570,7 @@ static const zend_function_entry session_functions[] = {
        PHP_FE(session_regenerate_id,     arginfo_session_regenerate_id)
        PHP_FE(session_decode,            arginfo_session_decode)
        PHP_FE(session_encode,            arginfo_session_void)
-       PHP_FE(session_start,             arginfo_session_void)
+       PHP_FE(session_start,             arginfo_session_start)
        PHP_FE(session_destroy,           arginfo_session_void)
        PHP_FE(session_unset,             arginfo_session_void)
        PHP_FE(session_set_save_handler,  arginfo_session_set_save_handler)
diff --git a/ext/session/tests/bug74541.phpt b/ext/session/tests/bug74541.phpt
new file mode 100644 (file)
index 0000000..8c70ebe
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Bug #74541 Wrong reflection on session_start()
+--SKIPIF--
+<?php
+include('skipif.inc');
+if (!extension_loaded('reflection')) die("skip");
+?>
+--FILE--
+<?php
+$r = new ReflectionFunction('session_start');
+var_dump($r->getNumberOfParameters());
+var_dump($r->getNumberOfRequiredParameters());
+?>
+===DONE===
+--EXPECT--
+int(1)
+int(0)
+===DONE===