Fix #75958 Return void instead of true

This commit is contained in:
Máté Kocsis 2020-03-25 12:33:38 +01:00
parent 2e8ccce5dc
commit 782f7e2ad8
No known key found for this signature in database
GPG Key ID: FD055E41728BF310
3 changed files with 6 additions and 7 deletions

View File

@ -314,6 +314,9 @@ PHP 8.0 UPGRADE NOTES
. SplHeap::compare($a, $b) now specifies a method signature. Inheriting . SplHeap::compare($a, $b) now specifies a method signature. Inheriting
classes implementing this method will now have to use a compatible classes implementing this method will now have to use a compatible
method signature. 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: - Standard:
. assert() will no longer evaluate string arguments, instead they will be . assert() will no longer evaluate string arguments, instead they will be

View File

@ -567,8 +567,6 @@ SPL_METHOD(SplDoublyLinkedList, push)
intern = Z_SPLDLLIST_P(ZEND_THIS); intern = Z_SPLDLLIST_P(ZEND_THIS);
spl_ptr_llist_push(intern->llist, value); spl_ptr_llist_push(intern->llist, value);
RETURN_TRUE;
} }
/* }}} */ /* }}} */
@ -585,8 +583,6 @@ SPL_METHOD(SplDoublyLinkedList, unshift)
intern = Z_SPLDLLIST_P(ZEND_THIS); intern = Z_SPLDLLIST_P(ZEND_THIS);
spl_ptr_llist_unshift(intern->llist, value); spl_ptr_llist_unshift(intern->llist, value);
RETURN_TRUE;
} }
/* }}} */ /* }}} */

View File

@ -17,13 +17,13 @@ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializa
/** /**
* @param mixed $value * @param mixed $value
* @return bool * @return void
*/ */
public function push($value) {} public function push($value) {}
/** /**
* @param mixed $value * @param mixed $value
* @return bool * @return void
*/ */
public function unshift($value) {} public function unshift($value) {}
@ -105,7 +105,7 @@ class SplQueue extends SplDoublyLinkedList
{ {
/** /**
* @param mixed $value * @param mixed $value
* @return bool * @return void
*/ */
public function enqueue($value) {} public function enqueue($value) {}