Skip to content

Commit

Permalink
Update gw-gravity-forms-rename-uploaded-files.php
Browse files Browse the repository at this point in the history
  • Loading branch information
claygriffiths authored Mar 30, 2022
1 parent ab42765 commit 849b916
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gravity-forms/gw-gravity-forms-rename-uploaded-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* + add a prefix or suffix to file uploads
* + include identifying submitted data in the file name like the user's first and last name
*
* @version 2.5.2
* @version 2.5.3
* @author David Smith <[email protected]>
* @license GPL-2.0+
* @link http://gravitywiz.com/rename-uploaded-files-for-gravity-form/
Expand Down Expand Up @@ -160,12 +160,12 @@ function stash_uploaded_files( $entry, $form ) {
}

/* Convert single files to array of files. */
if ( $existing_stashed_files && ! is_array( $existing_stashed_files ) ) {
$existing_stashed_files = array( $existing_stashed_files );
if ( ! is_array( $existing_stashed_files ) ) {
$existing_stashed_files = $existing_stashed_files ? array( $existing_stashed_files ) : array();
}

if ( $uploaded_files && ! is_array( $uploaded_files ) ) {
$uploaded_files = array( $uploaded_files );
if ( ! is_array( $uploaded_files ) ) {
$uploaded_files = $uploaded_files ? array( $uploaded_files ) : array();
}

if ( ! empty( $existing_stashed_files ) ) {
Expand Down

0 comments on commit 849b916

Please sign in to comment.