1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00

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
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
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

View File

@@ -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;
}
/* }}} */

View File

@@ -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) {}