diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-07-06 08:26:01 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2022-07-06 08:26:01 +0000 |
| commit | ac094fbcb004c36e88a61f54f9cbd3139c05a3cb (patch) | |
| tree | 6c99906471c2d8de03e8a3b4b91900ac7966177b /lib/classes/StudipArrayObject.class.php | |
| parent | 3d3bb7e2227aeb01f89569e037f50419e6ed0d66 (diff) | |
Fix miscellaneous errors, fixes #1276
Closes #1276
Merge request studip/studip!782
Diffstat (limited to 'lib/classes/StudipArrayObject.class.php')
| -rw-r--r-- | lib/classes/StudipArrayObject.class.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/classes/StudipArrayObject.class.php b/lib/classes/StudipArrayObject.class.php index c1aa0f3..bb5444c 100644 --- a/lib/classes/StudipArrayObject.class.php +++ b/lib/classes/StudipArrayObject.class.php @@ -89,7 +89,8 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, public function __set($key, $value) { if ($this->flag == self::ARRAY_AS_PROPS) { - return $this->offsetSet($key, $value); + $this->offsetSet($key, $value); + return; } $this->validateKeyUsage($key); @@ -106,7 +107,8 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, public function __unset($key) { if ($this->flag == self::ARRAY_AS_PROPS) { - return $this->offsetUnset($key); + $this->offsetUnset($key); + return; } $this->validateKeyUsage($key); @@ -122,7 +124,6 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, */ public function __get($key) { - $ret = null; if ($this->flag == self::ARRAY_AS_PROPS) { $ret = $this->offsetGet($key); return $ret; @@ -300,7 +301,8 @@ class StudipArrayObject implements IteratorAggregate, ArrayAccess, Serializable, public function offsetSet($key, $value) { if (is_null($key)) { - return $this->append($value); + $this->append($value); + return; } $this->storage[$key] = $value; } |
