com php-src: Added NEWS entry and test for bug 68446: NEWS Zend/tests/bug68446.phpt

From: Date: Sun, 23 Nov 2014 23:08:45 +0000
Subject: com php-src: Added NEWS entry and test for bug 68446: NEWS Zend/tests/bug68446.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83251@lists.php.net to get a copy of this message
Commit: dd70a2c7ae2b9c15f8dc0a4bdcdf6f09b6cc721e Author: Bob Weinand <bobwei9@hotmail.com> Mon, 24 Nov 2014 00:07:45 +0100 Parents: 4dc994571d2def413a83a607885f3e809b60019d Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dd70a2c7ae2b9c15f8dc0a4bdcdf6f09b6cc721e Log: Added NEWS entry and test for bug 68446 Bugs: https://bugs.php.net/68446 Changed paths: M NEWS A Zend/tests/bug68446.phpt Diff: diff --git a/NEWS b/NEWS index 3a04ddb..af4ce9b 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ PHP NEWS . Fixed bug #68355 (Inconsistency in example php.ini comments). (Chris McCafferty) . Fixed bug #68185 ("Inconsistent insteadof definition."- incorrectly triggered). (Julien) + . Fixed bug #68446 (Array constant not accepted for array parameter default). (Bob) - FPM: . Fixed bug #68420 (listen=9000 listens to ipv6 localhost instead of all diff --git a/Zend/tests/bug68446.phpt b/Zend/tests/bug68446.phpt new file mode 100644 index 0000000..48e6f52 --- /dev/null +++ b/Zend/tests/bug68446.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #68446 (Array constant not accepted for array parameter default) +--FILE-- +<?php +const FOO = [1]; +const BAR = null; + +function a(array $a = FOO) { + var_dump($a); +} + +function b(array $b = BAR) { + var_dump($b); +} + +b(null); +b([]); +b(); +a([]); +a(); +a(null); +?> +--EXPECTF-- +NULL +array(0) { +} +NULL +array(0) { +} +array(1) { + [0]=> + int(1) +} + +Catchable fatal error: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s on line %d +

« previous php.cvs (#83251) next »