Skip to content

Commit a4c5ede

Browse files
committed
Fix SplHeap::compare arginfo and tests
1 parent 67c0415 commit a4c5ede

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ext/spl/spl_heap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ static const zend_function_entry spl_funcs_SplHeap[] = {
11921192
SPL_ME(SplHeap, valid, arginfo_splheap_void, ZEND_ACC_PUBLIC)
11931193
SPL_ME(SplHeap, recoverFromCorruption, arginfo_splheap_void, ZEND_ACC_PUBLIC)
11941194
SPL_ME(SplHeap, isCorrupted, arginfo_splheap_void, ZEND_ACC_PUBLIC)
1195-
ZEND_FENTRY(compare, NULL, NULL, ZEND_ACC_PROTECTED|ZEND_ACC_ABSTRACT)
1195+
ZEND_FENTRY(compare, NULL, arginfo_heap_compare, ZEND_ACC_PROTECTED|ZEND_ACC_ABSTRACT)
11961196
PHP_FE_END
11971197
};
11981198
/* }}} */

ext/spl/tests/heap_isempty_variation_001.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
SPL: SplHeap: isEmpty argument variation.
33
--FILE--
44
<?php
5-
class SplHeap2 extends SplHeap{
65

7-
public function compare() {
8-
return -parent::compare();
9-
}
6+
class SplHeap2 extends SplHeap {
7+
public function compare($a, $b) {
8+
return -parent::compare($a, $b);
9+
}
1010
}
1111

12-
$h = new SplHeap2;
12+
$h = new SplHeap2();
1313
$h->isEmpty(1);
1414
?>
1515
--EXPECTF--

ext/spl/tests/spl_heap_extract_parameter_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TestFest London May 2009
88

99
class TestHeap extends SplHeap {
1010

11-
function compare() {
11+
function compare($a, $b) {
1212
print "This shouldn't be printed";
1313
}
1414
}

0 commit comments

Comments
 (0)