summaryrefslogtreecommitdiff
path: root/ext/spl/spl_heap.c
diff options
context:
space:
mode:
authorDavid Coallier <davidc@php.net>2008-11-22 14:19:47 +0000
committerDavid Coallier <davidc@php.net>2008-11-22 14:19:47 +0000
commit16de7fbd16d7a9cbed6e71db7b87bb3da0d2c6f4 (patch)
treeacd7c18b38f5a80bd33b5d8fd140c7ef22f17dc6 /ext/spl/spl_heap.c
parentb2e419ef40af4c685e1374bf345a0819e7eb1d1d (diff)
downloadphp-git-16de7fbd16d7a9cbed6e71db7b87bb3da0d2c6f4.tar.gz
- MFH
- Bug #46615 - Return the count - 1 when invoking SplHeap->key() - Adjusted the tests
Diffstat (limited to 'ext/spl/spl_heap.c')
-rw-r--r--ext/spl/spl_heap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c
index fe82d81644..f073597af1 100644
--- a/ext/spl/spl_heap.c
+++ b/ext/spl/spl_heap.c
@@ -970,8 +970,8 @@ static void spl_heap_it_move_forward(zend_object_iterator *iter TSRMLS_DC) /* {{
SPL_METHOD(SplHeap, key)
{
spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
-
- RETURN_LONG(intern->heap->count);
+
+ RETURN_LONG(intern->heap->count - 1);
}
/* }}} */