Commit 5f03e4b1 authored by KR Moorhouse's avatar KR Moorhouse

Updated get_option calls to use empty array as the default return value instead of false.

parent 792accb3
......@@ -70,12 +70,7 @@ final class NF_Actions_Save extends NF_Abstracts_Action
$expiration_value = $form_id . ',' . $action_settings[ 'subs_expire_time' ];
// Check for option value...
$option = get_option( 'nf_sub_expiration', false );
// If option doesn't exist we know that we can just create the option.
if( ! $option || empty( $option ) ){
return;
}
$option = get_option( 'nf_sub_expiration', array() );
// If our expiration setting is turned on...
if( 1 == $action_settings[ 'set_subs_to_expire' ] ) {
......
......@@ -17,7 +17,6 @@ class NF_Admin_Processes_ExpiredSubmissionCleanup extends NF_Abstracts_BatchProc
*/
public function __construct( $data = array() )
{
delete_option( 'nf_doing_expired_submission_cleanup' );
//Bail if we aren't in the admin.
if ( ! is_admin() )
return false;
......@@ -74,7 +73,7 @@ class NF_Admin_Processes_ExpiredSubmissionCleanup extends NF_Abstracts_BatchProc
public function startup()
{
// Retrieves the option that contains all of our expiration data.
$expired_sub_option = get_option( 'nf_sub_expiration' );
$expired_sub_option = get_option( 'nf_sub_expiration', array() );
// Loop over our options and ...
foreach( $expired_sub_option as $sub ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment