mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-10 01:07:45 +01:00
Fix #19041: Fix PHP 8.1 issues
This commit is contained in:
committed by
GitHub
parent
4bd551d143
commit
1271bc419f
@@ -1477,6 +1477,7 @@ class ArrayAccessibleObject implements ArrayAccess
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
@@ -1486,16 +1487,19 @@ class ArrayAccessibleObject implements ArrayAccess
|
||||
}
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return array_key_exists($offset, $this->container);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->offsetExists($offset) ? $this->container[$offset] : null;
|
||||
@@ -1519,26 +1523,31 @@ class TraversableArrayAccessibleObject extends ArrayAccessibleObject implements
|
||||
return array_key_exists($keyIndex, $keys) ? $keys[$keyIndex] : false;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
{
|
||||
$this->position = 0;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
return $this->offsetGet($this->getContainerKey($this->position));
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
return $this->getContainerKey($this->position);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function next()
|
||||
{
|
||||
++$this->position;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function valid()
|
||||
{
|
||||
$key = $this->getContainerKey($this->position);
|
||||
|
||||
Reference in New Issue
Block a user