svn: /php/php-src/trunk/ext/session/ mod_user.c tests/bug60860.phpt
| From: | Felipe Pena | Date: | Sat, 28 Jan 2012 01:24:54 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/session/ mod_user.c tests/bug60860.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-67560@lists.php.net to get a copy of this message | ||
felipe Sat, 28 Jan 2012 01:24:54 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=322897
Log:
- Fixed bug #60860 (session.save_handler=user without defined function core dumps)
Bug: https://bugs.php.net/60860 (Open)
session.save_handler=user without defined function core dumps
Changed paths:
U php/php-src/trunk/ext/session/mod_user.c
A php/php-src/trunk/ext/session/tests/bug60860.phpt
Modified: php/php-src/trunk/ext/session/mod_user.c
===================================================================
--- php/php-src/trunk/ext/session/mod_user.c 2012-01-28 00:37:53 UTC (rev 322896)
+++ php/php-src/trunk/ext/session/mod_user.c 2012-01-28 01:24:54 UTC (rev 322897)
@@ -80,6 +80,13 @@
{
zval *args[2];
STDVARS;
+
+ if (PSF(open) == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+ "user session functions not defined");
+
+ return FAILURE;
+ }
SESS_ZVAL_STRING((char*)save_path, args[0]);
SESS_ZVAL_STRING((char*)session_name, args[1]);
Added: php/php-src/trunk/ext/session/tests/bug60860.phpt
===================================================================
--- php/php-src/trunk/ext/session/tests/bug60860.phpt (rev 0)
+++ php/php-src/trunk/ext/session/tests/bug60860.phpt 2012-01-28 01:24:54 UTC (rev 322897)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60860 (session.save_handler=user without defined function core dumps)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=user
+--FILE--
+<?php
+
+session_start();
+echo "ok\n";
+
+?>
+--EXPECTF--
+Warning: session_start(): user session functions not defined in %s on line 3
+
+Fatal error: session_start(): Failed to initialize storage module: user (path: ) in %s on line 3