. Implemented FR #63472 (Setting SO_BINDTODEVICE with socket_set_option).
(Damjan Cvetko)
+- SPL:
+ . Fixed bug #61828 (Memleak when calling Directory(Recursive)Iterator
+ /Spl(Temp)FileObject ctor twice). (Laruence)
+
?? ??? 2013, PHP 5.4.17
- Core:
}
intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
+ if (intern->_path) {
+ /* object is alreay initialized */
+ zend_restore_error_handling(&error_handling TSRMLS_CC);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Directory object is already initialized");
+ return;
+ }
intern->flags = flags;
#ifdef HAVE_GLOB
if (SPL_HAS_FLAG(ctor_flags, DIT_CTOR_GLOB) && strstr(path, "glob://") != path) {
--- /dev/null
+--TEST--
+Bug #61828 (Memleak when calling Directory(Recursive)Iterator/Spl(Temp)FileObject ctor twice)
+--FILE--
+<?php
+$x = new DirectoryIterator('.');
+$x->__construct('/tmp');
+echo "Okey";
+?>
+--EXPECTF--
+Warning: DirectoryIterator::__construct(): Directory object is already initialized in %sbug61828.php on line 3
+Okey