]> granicus.if.org Git - php/commitdiff
Fix #75958 Return void instead of true
authorMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 25 Mar 2020 11:33:38 +0000 (12:33 +0100)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 25 Mar 2020 14:04:33 +0000 (15:04 +0100)
UPGRADING
ext/spl/spl_dllist.c
ext/spl/spl_dllist.stub.php

index ae8e2761198877e517432472a37a463a0a28a66a..183ded3ab7894ffd7e4c7d5181d7ba20ba1b0651 100644 (file)
--- 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
index 293eba9b7b18f37feb02c359ad5c603eeb7554ca..0aa4250fe468bcde38b96661587b86d039438f28 100644 (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;
 }
 /* }}} */
 
index 2c0d95c3dc82638d26f34c45d7c712301f70cfb7..c4101cc75c3873b66a761d37666b26c2143f3a40 100755 (executable)
@@ -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) {}