We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96a6a2e commit 2174475Copy full SHA for 2174475
1 file changed
src/Map.php
@@ -1928,8 +1928,8 @@ public function get( $key, $default = null )
1928
{
1929
$list = $this->list();
1930
1931
- if( array_key_exists( $key, $list ) ) {
1932
- return $list[$key];
+ if( array_key_exists( $key ?? '', $list ) ) {
+ return $list[$key ?? ''];
1933
}
1934
1935
if( ( $v = $this->val( $list, explode( $this->sep, (string) $key ) ) ) !== null ) {
@@ -3911,8 +3911,8 @@ public function prepend( $value, $key = null ) : self
3911
*/
3912
public function pull( $key, $default = null )
3913
3914
- $value = $this->get( $key, $default );
3915
- unset( $this->list()[$key] );
+ $value = $this->get( $key ?? '', $default );
+ unset( $this->list()[$key ?? ''] );
3916
3917
return $value;
3918
0 commit comments