added protection for first post
This commit is contained in:
@@ -24,7 +24,7 @@ if (!defined('ABSPATH')) {
|
||||
function form_partner_before_process($form_id, $post_array, $form_type) {
|
||||
//error_log("post_array: " . json_encode($post_array));
|
||||
|
||||
if (is_null($post_array) || empty($post_array)) {
|
||||
if (empty($post_array)) {
|
||||
//nothing to overwrite
|
||||
return Fbpatch::set_post_elements_to_forget(0, false, array());
|
||||
}
|
||||
@@ -32,6 +32,10 @@ function form_partner_before_process($form_id, $post_array, $form_type) {
|
||||
//nothing to overwrite
|
||||
return Fbpatch::set_post_elements_to_forget(0, false, array());
|
||||
}
|
||||
if (!isset($post_array['ID']) || empty($post_array['ID'])) {
|
||||
//nothing to overwrite
|
||||
return Fbpatch::set_post_elements_to_forget(0, false, array());
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user