Skip to content

Commit 4a320b1

Browse files
Merge pull request #9 from NuclearDog/master
Fix notice returning reference in DotAccess::get
2 parents 7704a0f + 0f008b6 commit 4a320b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/KubernetesClient/Dotty/DotAccess.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ public static function &get(&$currentValue, $key, $default = null) {
8888
$currentValue = &self::propGet($currentValue, $currentKey);
8989
}
9090

91-
return $currentValue === null ? $default : $currentValue;
91+
if ($currentValue === null)
92+
return $default;
93+
else
94+
return $currentValue;
9295
}
9396

9497
public static function exists(&$currentValue, $key) {

0 commit comments

Comments
 (0)