Check if mapped value is not null before returning true

This commit is contained in:
Narek Zakarian 2025-02-17 20:17:51 +04:00
parent 22ddf2597f
commit fbeae9b0ed
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -120,7 +120,10 @@ class Settings implements ContainerInterface {
* @return bool
*/
public function has( string $id ) {
if ( $this->settings_map_helper->has_mapped_key( $id ) ) {
if (
$this->settings_map_helper->has_mapped_key( $id )
&& ! is_null( $this->settings_map_helper->mapped_value( $id ) )
) {
return true;
}