Changeset 647784
- Timestamp:
- 01/04/2013 09:45:10 AM (13 years ago)
- File:
-
- 1 edited
-
edge-suite/trunk/includes/edge-suite-general.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
edge-suite/trunk/includes/edge-suite-general.php
r632663 r647784 145 145 $files = list_files($dir); 146 146 $matching_files = array(); 147 foreach ($files as $file) { 148 if (preg_match($pattern, $file)) { 149 $matching_files[] = $file; 147 if($files !== FALSE){ 148 foreach ($files as $file) { 149 if (preg_match($pattern, $file)) { 150 $matching_files[] = $file; 151 } 150 152 } 151 153 } … … 154 156 155 157 function rmdir_recursive($dir) { 156 //global $wp_filesystem; 157 foreach(glob($dir . '/*') as $file) { 158 if(@is_dir($file)) 159 rmdir_recursive($file); 160 else 161 @unlink($file); 158 $files = glob($dir . '/*'); 159 if($files !== FALSE){ 160 foreach($files as $file) { 161 if(@is_dir($file)) 162 rmdir_recursive($file); 163 else 164 @unlink($file); 165 } 162 166 } 163 167 @rmdir($dir);
Note: See TracChangeset
for help on using the changeset viewer.