From 782dfcd2a81545f60d7c8c3bafb0d8605c858492 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 2 Mar 2023 15:07:37 -0700 Subject: [PATCH] Remove mixed type return as that causes fatal errors on PHP 7.4. Add new attribute that will suppress the deprecation notice on PHP 8.1 --- includes/class-windows-azure-generic-list-response.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/class-windows-azure-generic-list-response.php b/includes/class-windows-azure-generic-list-response.php index e3fc8fc3..876a8aac 100644 --- a/includes/class-windows-azure-generic-list-response.php +++ b/includes/class-windows-azure-generic-list-response.php @@ -138,7 +138,8 @@ public function __construct( array $rest_response, Windows_Azure_Rest_Api_Client * * @return mixed Can return any type. */ - public function current(): mixed { + #[\ReturnTypeWillChange] + public function current() { if ( ! isset( $this->_items[ $this->_position ] ) ) { return null; } else { @@ -172,7 +173,8 @@ public function next(): void { * * @return mixed scalar on success, or null on failure. */ - public function key(): mixed { + #[\ReturnTypeWillChange] + public function key() { return $this->_position; } @@ -216,7 +218,8 @@ public function get_all() { * * @return null|string Next portion of data marker. */ - public function get_next_marker(): mixed { + #[\ReturnTypeWillChange] + public function get_next_marker() { return $this->_next_marker; }