]> granicus.if.org Git - php/commitdiff
Test for #60174 (Notice when array in method prototype error)
authorXinchen Hui <laruence@php.net>
Mon, 31 Oct 2011 06:04:43 +0000 (06:04 +0000)
committerXinchen Hui <laruence@php.net>
Mon, 31 Oct 2011 06:04:43 +0000 (06:04 +0000)
Zend/tests/argument_restriction_006.phpt [new file with mode: 0644]

diff --git a/Zend/tests/argument_restriction_006.phpt b/Zend/tests/argument_restriction_006.phpt
new file mode 100644 (file)
index 0000000..948fc30
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Bug #60174 (Notice when array in method prototype error)
+--FILE--
+<?php
+Abstract Class Base {
+       public function test($foo, $extra = array("test")) {
+       }       
+}
+
+class Sub extends Base {
+       public function test($foo, $extra) {
+       }       
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d