Skip to content

Commit 6008539

Browse files
committed
Added a workaround for GLOB_BRACE flag not being available on some non GNU systems
1 parent 81c97bf commit 6008539

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pdf-forms-for-wpforms.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,8 @@ public function remove_tmp_dir()
744744
return;
745745

746746
// remove files in the directory
747-
$files = glob( trailingslashit( $this->tmp_dir ) . '{,.}*', GLOB_BRACE );
747+
$tmp_dir_slash = trailingslashit( $this->tmp_dir );
748+
$files = array_merge( glob( $tmp_dir_slash . '*' ), glob( $tmp_dir_slash . '.*' ) );
748749
while( $file = array_shift( $files ) )
749750
if( is_file( $file ) )
750751
@unlink( $file );

0 commit comments

Comments
 (0)