- BCmath:
. Fixed bug #60377 (bcscale related crashes on 64bits platforms) (shm)
+- Reflection:
+ . Fixed bug #60357 (__toString() method triggers E_NOTICE "Array to string
+ conversion"). (Laruence)
+
11 Nov 2011, PHP 5.4.0 RC1
- General improvements:
. Changed silent conversion of array to string to produce a notice. (Patrick)
string_write(str, "...", sizeof("...")-1);
}
string_write(str, "'", sizeof("'")-1);
+ } else if (Z_TYPE_P(zv) == IS_ARRAY) {
+ string_write(str, "Array", sizeof("Array")-1);
} else {
zend_make_printable_zval(zv, &zv_copy, &use_copy);
string_write(str, Z_STRVAL(zv_copy), Z_STRLEN(zv_copy));
--- /dev/null
+--TEST--
+Bug #60357 (__toString() method triggers E_NOTICE "Array to string conversion")
+--FILE--
+<?php
+function foo( array $x = array( 'a', 'b' ) ) {}
+$r = new ReflectionParameter( 'foo', 0 );
+echo $r->__toString();
+?>
+--EXPECTF--
+Parameter #0 [ <optional> array $x = Array ]