Skip to content

Commit

Permalink
Add error message about using of_get_option without an initialized op…
Browse files Browse the repository at this point in the history
…tions framework
  • Loading branch information
benlk committed Oct 25, 2016
1 parent 43c592a commit b0bfc39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/options-framework/options-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ function of_get_option( $name, $default = false ) {
$config = get_option( 'optionsframework' );

if ( ! isset( $config['id'] ) ) {
var_log( "It looks like you are calling of_get_option on a site that has not initialized the options framework. Running `get_option( 'optionsframework' )` returns the following value, which does not have an index 'id' or is not an array:");
var_log( $config );
return $default;
}

Expand Down

0 comments on commit b0bfc39

Please sign in to comment.