Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
themefuse committed Feb 17, 2015
1 parent a17cf2e commit e925c16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework/helpers/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ function fw_get_db_settings_option( $option_id = null, $default_value = null, $g
$option_id, $default_value, $get_original_value
);

if ( is_null( $value ) ) {
if (
(!is_null($option_id) && is_null($value)) // a specific option_id was requested
||
(is_null($option_id) && empty($value)) // all options were requested but the db value is empty (this can happen after Reset)
) {
/**
* Maybe the options was never saved or the given option id does not exist
* Extract the default values from the options array and try to find there the option id
Expand Down

0 comments on commit e925c16

Please sign in to comment.