We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e53f25 commit 67c129aCopy full SHA for 67c129a
php/class-data-item.php
@@ -204,7 +204,8 @@ public function get_allowed_fields(): array {
204
* @return bool true if the is allowed, false if invalid.
205
*/
206
public function is_allowed_field( string $field ): bool {
207
- return isset( $this->fields[ $field ] ) || isset( $this->field_aliases[ $field ] );
+ return $this->fields && array_key_exists( $field, $this->fields ) ||
208
+ $this->field_aliases && array_key_exists( $field, $this->field_aliases );
209
}
210
211
/**
0 commit comments