Skip to content
Snippets Groups Projects
Commit 31964892 authored by Dani Quilez's avatar Dani Quilez Committed by Lucas García
Browse files

avoid error when new database still doesn't have an api-key option already saved

parent 27b94378
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,6 @@ function wpct_oc_settings_init()
*/
function wpct_oc_api_key_render()
{
echo "<input type='text' name='wpct_oc_api_key' value='" . wpct_oc_get_api_key() . "'> ";
}
......@@ -83,5 +82,5 @@ function wpct_oc_settings_section_callback()
*/
function wpct_oc_get_api_key()
{
return get_option('wpct_oc_api_key') ? get_option('wpct_oc_api_key') : '';
return isset(get_option('wpct_oc_api_key')) ? get_option('wpct_oc_api_key') : '';
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment