. Fixed bug #51127/#65359 Request #25630/#43980/#54383 (Added php_serialize
session serialize handler that uses plain serialize()). (Yasuo)
+- SPL:
+ . Fix bug #64782 (SplFileObject constructor make $context optional / give it
+ a default value). (Nikita)
+
- Standard:
. Fix issue with return types of password API helper functions. Found via static
analysis by cjones. (Anthony Ferrara)
intern->u.file.open_mode = NULL;
intern->u.file.open_mode_len = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|sbr",
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|sbr!",
&intern->file_name, &intern->file_name_len,
&intern->u.file.open_mode, &intern->u.file.open_mode_len,
&use_include_path, &intern->u.file.zcontext) == FAILURE) {
--- /dev/null
+--TEST--
+Bug #64782: SplFileObject constructor make $context optional / give it a default value
+--FILE--
+<?php
+
+var_dump(new SplFileObject(__FILE__, "r", false, null));
+
+?>
+--EXPECTF--
+object(SplFileObject)#1 (%d) {
+ ["pathName":"SplFileInfo":private]=>
+ string(50) "%s/bug64782.php"
+ ["fileName":"SplFileInfo":private]=>
+ string(12) "bug64782.php"
+ ["openMode":"SplFileObject":private]=>
+ string(1) "r"
+ ["delimiter":"SplFileObject":private]=>
+ string(1) ","
+ ["enclosure":"SplFileObject":private]=>
+ string(1) """
+}