Skip to content

Commit f7748e5

Browse files
tanftwrilwis
andauthored
fix: warning when no id in settings (#24)
* fix: warning when no id in settings * Shorten code --------- Co-authored-by: Anh Tran <[email protected]>
1 parent 2b409f7 commit f7748e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Base.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ protected function get_types(): array {
4545
return [ $this->object_type ];
4646
}
4747

48-
public function get( array $data ): array {
49-
return $this->get_values( $data['id'] );
48+
public function get( array $object ): array {
49+
return empty( $object['id'] ) ? [] : $this->get_values( $object['id'] );
5050
}
5151

5252
/**

0 commit comments

Comments
 (0)