Skip to content

Commit 782f7e2

Browse files
committed
Fix #75958 Return void instead of true
1 parent 2e8ccce commit 782f7e2

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

UPGRADING

+3
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ PHP 8.0 UPGRADE NOTES
314314
. SplHeap::compare($a, $b) now specifies a method signature. Inheriting
315315
classes implementing this method will now have to use a compatible
316316
method signature.
317+
. SplDoublyLinkedList::push() now returns void instead of true
318+
. SplDoublyLinkedList::unshift() now returns void instead of true
319+
. SplQueue::enqueue() now returns void instead of true
317320

318321
- Standard:
319322
. assert() will no longer evaluate string arguments, instead they will be

ext/spl/spl_dllist.c

-4
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,6 @@ SPL_METHOD(SplDoublyLinkedList, push)
567567

568568
intern = Z_SPLDLLIST_P(ZEND_THIS);
569569
spl_ptr_llist_push(intern->llist, value);
570-
571-
RETURN_TRUE;
572570
}
573571
/* }}} */
574572

@@ -585,8 +583,6 @@ SPL_METHOD(SplDoublyLinkedList, unshift)
585583

586584
intern = Z_SPLDLLIST_P(ZEND_THIS);
587585
spl_ptr_llist_unshift(intern->llist, value);
588-
589-
RETURN_TRUE;
590586
}
591587
/* }}} */
592588

ext/spl/spl_dllist.stub.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ public function shift() {}
1717

1818
/**
1919
* @param mixed $value
20-
* @return bool
20+
* @return void
2121
*/
2222
public function push($value) {}
2323

2424
/**
2525
* @param mixed $value
26-
* @return bool
26+
* @return void
2727
*/
2828
public function unshift($value) {}
2929

@@ -105,7 +105,7 @@ class SplQueue extends SplDoublyLinkedList
105105
{
106106
/**
107107
* @param mixed $value
108-
* @return bool
108+
* @return void
109109
*/
110110
public function enqueue($value) {}
111111

0 commit comments

Comments
 (0)