Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gravityforms-update-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ public static function gform_post_data( $post_data, $form )
*/
public static function required_upload_field_validation( $result, $value, $form, $field )
{
if ( ('post_image' == $field['type'] || 'fileupload' == $field['inputType']) && $field['isRequired'] && ! $result['is_valid'] ) // || 'post_image' == $field['type']
if ( ! empty( self::$post->ID ) && ('post_image' == $field['type'] || 'fileupload' == $field['inputType']) && $field['isRequired'] && ! $result['is_valid'] ) // || 'post_image' == $field['type']
{
if ( ('post_image' == $field['type'] && has_post_thumbnail(self::$post->ID)) || ('fileupload' == $field['inputType'] && get_post_meta( self::$post->ID, $field['postCustomFieldName'], true )) ) {
$result['is_valid'] = true;
Expand Down Expand Up @@ -1332,4 +1332,4 @@ public static function gform_tooltips($tooltips)
}
}

endif;
endif;