From 12cab1f1318a19dc374e50e04ca9d7ed2af9bda7 Mon Sep 17 00:00:00 2001 From: eoxia-amandine Date: Tue, 5 Nov 2024 11:04:39 +0100 Subject: [PATCH] #23 [Settings] fix: option notice empty --- includes/class-eoblocks-helper.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-eoblocks-helper.php b/includes/class-eoblocks-helper.php index bcfa5df..0eb07a4 100644 --- a/includes/class-eoblocks-helper.php +++ b/includes/class-eoblocks-helper.php @@ -16,6 +16,10 @@ class Eoblocks_Helper { public static function digirisk_api_get( $route, $params ) { $eoblocks_settings = get_option('eoblocks_settings'); + if ( ! is_array( $eoblocks_settings ) ) { + return []; + } + $base_url_api = $eoblocks_settings['eoblocks_dolibarr_url']; $api_key = $eoblocks_settings['eoblocks_dolibarr_api_key'];