svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/session/session.c branches/PHP_5_3/ext/session/tests/bug53141.phpt
trunk/ext/session/session.c trunk/ext/session/tests/bug53141.phpt
| From: | Felipe Pena | Date: | Tue, 02 Nov 2010 18:34:56 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/session/session.c branches/PHP_5_3/ext/session/tests/bug53141.phpt trunk/ext/session/session.c trunk/ext/session/tests/bug53141.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-63742@lists.php.net to get a copy of this message | ||
felipe Tue, 02 Nov 2010 18:34:56 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305034
Log:
- Fixed bug #53141 (autoload misbehaves if called from closing session)
patch by: ladislav at marek dot su
Bug: http://bugs.php.net/53141 (Open) autoload misbehaves if
called from closing session
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/session/session.c
A php/php-src/branches/PHP_5_3/ext/session/tests/bug53141.phpt
U php/php-src/trunk/ext/session/session.c
A php/php-src/trunk/ext/session/tests/bug53141.phpt
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-11-02 18:06:39 UTC (rev 305033)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-11-02 18:34:56 UTC (rev 305034)
@@ -54,6 +54,8 @@
type is application/x-www-form-urlencoded or is not registered with PHP).
(gm at tlink dot de, Gustavo)
- Fixed bug #53144 (Segfault in SplObjectStorage::removeAll()). (Felipe)
+- Fixed bug #53141 (autoload misbehaves if called from closing session).
+ (ladislav at marek dot su)
- Fixed bug #53071 (SPLObjectStorage defeats gc_collect_cycles). (Gustavo)
- Fixed bug #53006 (stream_get_contents has an unpredictable behavior when the
underlying stream does not support seeking). (Gustavo)
Modified: php/php-src/branches/PHP_5_3/ext/session/session.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/session/session.c 2010-11-02 18:06:39 UTC (rev 305033)
+++ php/php-src/branches/PHP_5_3/ext/session/session.c 2010-11-02 18:34:56 UTC (rev 305034)
@@ -2282,6 +2282,7 @@
static const zend_module_dep session_deps[] = { /* {{{ */
ZEND_MOD_OPTIONAL("hash")
+ ZEND_MOD_REQUIRED("spl")
{NULL, NULL, NULL}
};
/* }}} */
Added: php/php-src/branches/PHP_5_3/ext/session/tests/bug53141.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/session/tests/bug53141.phpt (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/session/tests/bug53141.phpt 2010-11-02 18:34:56 UTC (rev
305034)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #53141 (autoload misbehaves if called from closing session)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+spl_autoload_register(function ($class) {
+ var_dump("Loading $class");
+ eval('class Bar {}');
+});
+
+class Foo
+{
+ function __sleep()
+ {
+ new Bar;
+ return array();
+ }
+}
+
+session_start();
+$_SESSION['foo'] = new Foo;
+
+?>
+--EXPECT--
+string(11) "Loading Bar"
\ No newline at end of file
Property changes on: php/php-src/branches/PHP_5_3/ext/session/tests/bug53141.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision
Added: svn:eol-style
+ native
Modified: php/php-src/trunk/ext/session/session.c
===================================================================
--- php/php-src/trunk/ext/session/session.c 2010-11-02 18:06:39 UTC (rev 305033)
+++ php/php-src/trunk/ext/session/session.c 2010-11-02 18:34:56 UTC (rev 305034)
@@ -2074,6 +2074,7 @@
static const zend_module_dep session_deps[] = { /* {{{ */
ZEND_MOD_OPTIONAL("hash")
+ ZEND_MOD_REQUIRED("spl")
{NULL, NULL, NULL}
};
/* }}} */
Added: php/php-src/trunk/ext/session/tests/bug53141.phpt
===================================================================
--- php/php-src/trunk/ext/session/tests/bug53141.phpt (rev 0)
+++ php/php-src/trunk/ext/session/tests/bug53141.phpt 2010-11-02 18:34:56 UTC (rev 305034)
@@ -0,0 +1,26 @@
+--TEST--
+Bug #53141 (autoload misbehaves if called from closing session)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+spl_autoload_register(function ($class) {
+ var_dump("Loading $class");
+ eval('class Bar {}');
+});
+
+class Foo
+{
+ function __sleep()
+ {
+ new Bar;
+ return array();
+ }
+}
+
+session_start();
+$_SESSION['foo'] = new Foo;
+
+?>
+--EXPECT--
+string(11) "Loading Bar"
\ No newline at end of file
Property changes on: php/php-src/trunk/ext/session/tests/bug53141.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision
Added: svn:eol-style
+ native