diff options
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/019.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/bug32428.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/bug64966.phpt | 30 | ||||
-rw-r--r-- | Zend/tests/bug64988.phpt | 30 | ||||
-rw-r--r-- | Zend/tests/bug65051.phpt | 23 | ||||
-rw-r--r-- | Zend/tests/gc_007.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/gc_008.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/gc_009.phpt | 2 | ||||
-rw-r--r-- | Zend/tests/generators/yield_without_value.phpt | 14 |
9 files changed, 95 insertions, 12 deletions
diff --git a/Zend/tests/019.phpt b/Zend/tests/019.phpt index 70093cd28..654f86bb1 100644 --- a/Zend/tests/019.phpt +++ b/Zend/tests/019.phpt @@ -357,7 +357,7 @@ var_dump($global_var); test_unset3(); var_dump($global_var); -//Note: No error conditions relating to passing arugments can be tested +//Note: No error conditions relating to passing arguments can be tested // because these are not functions but statements, it will result in syntax error. ?> ===DONE=== diff --git a/Zend/tests/bug32428.phpt b/Zend/tests/bug32428.phpt index 0b5ca6aeb..e75148fec 100644 --- a/Zend/tests/bug32428.phpt +++ b/Zend/tests/bug32428.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #32428 (The @ warning error supression operator is broken) +Bug #32428 (The @ warning error suppression operator is broken) --FILE-- <?php $data = @$not_exists; diff --git a/Zend/tests/bug64966.phpt b/Zend/tests/bug64966.phpt new file mode 100644 index 000000000..c1cdbbf81 --- /dev/null +++ b/Zend/tests/bug64966.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #64966 (segfault in zend_do_fcall_common_helper_SPEC) +--FILE-- +<?php +error_reporting(E_ALL); +set_error_handler(function($error) { throw new Exception(); }, E_RECOVERABLE_ERROR); + +function test($func) { + $a = $func(""); + return true; +} +class A { + public function b() { + test("strlen"); + test("iterator_apply"); + } +} + +$a = new A(); +$a->b(); +?> +--EXPECTF-- +Fatal error: Uncaught exception 'Exception' in %sbug64966.php:3 +Stack trace: +#0 [internal function]: {closure}(4096, 'Argument 1 pass...', '%s', 6, Array) +#1 %sbug64966.php(6): iterator_apply('') +#2 %sbug64966.php(12): test('iterator_apply') +#3 %sbug64966.php(17): A->b() +#4 {main} + thrown in %sbug64966.php on line 3 diff --git a/Zend/tests/bug64988.phpt b/Zend/tests/bug64988.phpt new file mode 100644 index 000000000..34fd482f3 --- /dev/null +++ b/Zend/tests/bug64988.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #64988 (Class loading order affects E_STRICT warning) +--FILE-- +<?php +abstract class Base1 { + public function insert(array $data){ + return array_reverse($data); + } +} + +class Noisy1 extends Base1 { + public function insert(array $data, $option1 = Null) { + if (!empty($option1)) { + $data['option1'] = $option1; + } + return parent::insert($data); + } +} +class Smooth1 extends Noisy1 { + public function insert(array $data) { + return parent::insert($data, count($data)); + } +} + +$o = new Smooth1(); +echo "okey"; +?> +--EXPECTF-- +Strict Standards: Declaration of Smooth1::insert() should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20 +okey diff --git a/Zend/tests/bug65051.phpt b/Zend/tests/bug65051.phpt new file mode 100644 index 000000000..42febf5b9 --- /dev/null +++ b/Zend/tests/bug65051.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #65051: count() off by one inside unset() +--FILE-- +<?php + +class Foo { + public $array; + + public function __destruct() { + var_dump(count($this->array[0])); + var_dump($this->array[0]); + } +} + +$array = [[new Foo]]; +$array[0][0]->array =& $array; +unset($array[0][0]); + +?> +--EXPECT-- +int(0) +array(0) { +} diff --git a/Zend/tests/gc_007.phpt b/Zend/tests/gc_007.phpt index 8601ea43b..a018e4846 100644 --- a/Zend/tests/gc_007.phpt +++ b/Zend/tests/gc_007.phpt @@ -1,5 +1,5 @@ --TEST-- -GC 007: Unreferensed array cycle +GC 007: Unreferenced array cycle --INI-- zend.enable_gc=1 --FILE-- diff --git a/Zend/tests/gc_008.phpt b/Zend/tests/gc_008.phpt index 289d581d6..4e27e5b70 100644 --- a/Zend/tests/gc_008.phpt +++ b/Zend/tests/gc_008.phpt @@ -1,5 +1,5 @@ --TEST-- -GC 008: Unreferensed object cycle +GC 008: Unreferenced object cycle --INI-- zend.enable_gc=1 --FILE-- diff --git a/Zend/tests/gc_009.phpt b/Zend/tests/gc_009.phpt index 263d31f45..3f4657d2e 100644 --- a/Zend/tests/gc_009.phpt +++ b/Zend/tests/gc_009.phpt @@ -1,5 +1,5 @@ --TEST-- -GC 009: Unreferensed array-object cycle +GC 009: Unreferenced array-object cycle --INI-- zend.enable_gc=1 --FILE-- diff --git a/Zend/tests/generators/yield_without_value.phpt b/Zend/tests/generators/yield_without_value.phpt index 510c755bd..52292b737 100644 --- a/Zend/tests/generators/yield_without_value.phpt +++ b/Zend/tests/generators/yield_without_value.phpt @@ -9,13 +9,13 @@ function recv() { } } -$reciever = recv(); -var_dump($reciever->current()); -$reciever->send(1); -var_dump($reciever->current()); -$reciever->send(2); -var_dump($reciever->current()); -$reciever->send(3); +$receiver = recv(); +var_dump($receiver->current()); +$receiver->send(1); +var_dump($receiver->current()); +$receiver->send(2); +var_dump($receiver->current()); +$receiver->send(3); ?> --EXPECT-- |