- Fixed open_basedir circumvention for mail.log. (Maksymilian Arciemowicz,
Stas)
- Fixed signature generation/validation for zip archives in ext/phar. (Greg)
+- Fixed memory leak in stream_is_local(). (Felipe)
- Fixed bug #49132 (posix_times returns false without error).
(phpbugs at gunnu dot us)
}
wrapper = stream->wrapper;
} else {
- convert_to_string_ex(&zstream);
- wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(zstream), NULL, 0 TSRMLS_CC);
+ zval *copy_tmp;
+
+ ALLOC_ZVAL(copy_tmp);
+ *copy_tmp = *zstream;
+ zval_copy_ctor(copy_tmp);
+ INIT_PZVAL(copy_tmp);
+ convert_to_string(copy_tmp);
+
+ wrapper = php_stream_locate_url_wrapper(Z_STRVAL_P(copy_tmp), NULL, 0 TSRMLS_CC);
+
+ zval_ptr_dtor(©_tmp);
}
if(!wrapper) {
--- /dev/null
+--TEST--
+Testing stream_is_local()
+--FILE--
+<?php
+
+$a = 1;
+$b = $a;
+var_dump(stream_is_local($b));
+var_dump($b);
+
+var_dump(stream_is_local(fopen(__FILE__, 'r')));
+
+?>
+--EXPECT--
+bool(true)
+int(1)
+bool(true)