forked from zendframework/zf1
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
PHP Fatal error: During inheritance of ArrayAccess: Uncaught Exception: Deprecated Functionality: Return type of Zend_Memory_Value::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/magento/zendframework1/library/Zend/Memory/Value.php
Here's a patch :
--- a/library/Zend/Memory/Value.php
+++ b/library/Zend/Memory/Value.php
@@ -86,7 +86,7 @@
* @param integer $offset
* @return boolean
*/
- public function offsetExists($offset)
+ public function offsetExists(mixed $offset): bool
{
return $offset >= 0 && $offset < strlen($this->_value);
}
@@ -98,7 +98,7 @@
* @param integer $offset
* @return string
*/
- public function offsetGet($offset)
+ public function offsetGet(mixed $offset): mixed
{
return $this->_value[$offset];
}
@@ -110,7 +110,7 @@
* @param integer $offset
* @param string $char
*/
- public function offsetSet($offset, $char)
+ public function offsetSet(mixed $offset, mixed $value): void
{
$this->_value[$offset] = $char;
@@ -126,7 +126,7 @@
*
* @param integer $offset
*/
- public function offsetUnset($offset)
+ public function offsetUnset(mixed $offset): void
{
unset($this->_value[$offset]);
Metadata
Metadata
Assignees
Labels
No labels