patch by: ladislav at marek dot su
static const zend_module_dep session_deps[] = { /* {{{ */
ZEND_MOD_OPTIONAL("hash")
+ ZEND_MOD_REQUIRED("spl")
{NULL, NULL, NULL}
};
/* }}} */
--- /dev/null
+--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