From: Máté Kocsis Date: Wed, 25 Mar 2020 11:33:38 +0000 (+0100) Subject: Fix #75958 Return void instead of true X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=782f7e2ad864693919b9f9efbb4d64bbae17cdc5;p=php Fix #75958 Return void instead of true --- diff --git a/UPGRADING b/UPGRADING index ae8e276119..183ded3ab7 100644 --- a/UPGRADING +++ b/UPGRADING @@ -314,6 +314,9 @@ PHP 8.0 UPGRADE NOTES . SplHeap::compare($a, $b) now specifies a method signature. Inheriting classes implementing this method will now have to use a compatible method signature. + . SplDoublyLinkedList::push() now returns void instead of true + . SplDoublyLinkedList::unshift() now returns void instead of true + . SplQueue::enqueue() now returns void instead of true - Standard: . assert() will no longer evaluate string arguments, instead they will be diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 293eba9b7b..0aa4250fe4 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -567,8 +567,6 @@ SPL_METHOD(SplDoublyLinkedList, push) intern = Z_SPLDLLIST_P(ZEND_THIS); spl_ptr_llist_push(intern->llist, value); - - RETURN_TRUE; } /* }}} */ @@ -585,8 +583,6 @@ SPL_METHOD(SplDoublyLinkedList, unshift) intern = Z_SPLDLLIST_P(ZEND_THIS); spl_ptr_llist_unshift(intern->llist, value); - - RETURN_TRUE; } /* }}} */ diff --git a/ext/spl/spl_dllist.stub.php b/ext/spl/spl_dllist.stub.php index 2c0d95c3dc..c4101cc75c 100755 --- a/ext/spl/spl_dllist.stub.php +++ b/ext/spl/spl_dllist.stub.php @@ -17,13 +17,13 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializa /** * @param mixed $value - * @return bool + * @return void */ public function push($value) {} /** * @param mixed $value - * @return bool + * @return void */ public function unshift($value) {} @@ -105,7 +105,7 @@ class SplQueue extends SplDoublyLinkedList { /** * @param mixed $value - * @return bool + * @return void */ public function enqueue($value) {}