Skip to content

Commit 0f008b6

Browse files
committed
Fix notice returning reference in DotAccess::get
1 parent 7704a0f commit 0f008b6

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)