Commit 43f61ae0 authored by Kevin Stover's avatar Kevin Stover

Merge branch 'issue#3701' into 'develop'

Resolve get_settings() on NULL

Closes #3701

See merge request ninja-forms/ninja-forms!3666
parents af07b6f2 6bcced25
......@@ -347,13 +347,19 @@ final class NF_Database_Models_Form extends NF_Abstracts_Model
$fields = Ninja_Forms()->form( $form_id )->get_fields();
foreach( $fields as $field ){
$export['fields'][] = $field->get_settings();
// If the field is set.
if ( ! is_null( $field ) && ! empty( $field ) ) {
$export['fields'][] = $field->get_settings();
}
}
$actions = Ninja_Forms()->form( $form_id )->get_actions();
foreach( $actions as $action ){
$export[ 'actions' ][] = $action->get_settings();
// If the action is set.
if ( ! is_null( $action ) && ! empty( $action ) ) {
$export[ 'actions' ][] = $action->get_settings();
}
}
if( $return ){
......
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