Skip to content

Commit

Permalink
Fixed bug to prevent crash the wordpress instance when the plugin is …
Browse files Browse the repository at this point in the history
…installed on the first time
  • Loading branch information
antonio-goncalves-unp committed Dec 12, 2023
1 parent a544748 commit 420a5cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function iotcat_add_element_plural_field($element_name,$label){
$options = get_option( 'iotcat_options' );


if(array_key_exists("iotcat_field_base_url", $options) && $options["iotcat_field_base_url"]!==$iotcat_default_base_url || array_key_exists("advanced_settings",$_GET) ){
if(gettype($options)=== "array" && array_key_exists("iotcat_field_base_url", $options) && $options["iotcat_field_base_url"]!==$iotcat_default_base_url || array_key_exists("advanced_settings",$_GET) ){
add_settings_field(
'iotcat_field_base_url',
__( 'Base url of IoT Catalogue instance', 'iotcat' ),
Expand Down

0 comments on commit 420a5cb

Please sign in to comment.