Changeset 14157
- Timestamp:
- 12/18/2025 10:54:12 PM (5 months ago)
- Location:
- branches/14.0/src/bp-core
- Files:
-
- 2 edited
-
bp-core-attachments.php (modified) (4 diffs)
-
bp-core-avatars.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/14.0/src/bp-core/bp-core-attachments.php
r14151 r14157 531 531 $file = false; 532 532 533 // Open the directory and get the first file.533 // Open the directory. 534 534 $att_dir = opendir( $type_dir ); 535 535 if ( $att_dir ) { … … 542 542 } 543 543 } 544 545 // Close the directory. 546 closedir( $att_dir ); 544 547 } 545 548 … … 1346 1349 $cover_basename = wp_basename( $cover_file ); 1347 1350 1348 if ( $att_dir = opendir( $args['cover_image_dir'] ) ) { 1351 // Open the directory. 1352 $att_dir = opendir( $args['cover_image_dir'] ); 1353 if ( $att_dir ) { 1349 1354 while ( false !== ( $attachment_file = readdir( $att_dir ) ) ) { 1350 1355 // Skip directories and the new cover image. … … 1353 1358 } 1354 1359 } 1360 1361 // Close the directory. 1362 closedir( $att_dir ); 1355 1363 } 1356 1364 -
branches/14.0/src/bp-core/bp-core-avatars.php
r14155 r14157 526 526 if ( ! $params['force_default'] && file_exists( $avatar_folder_dir ) ) { 527 527 528 // Open directory. 529 if ( $av_dir = opendir( $avatar_folder_dir ) ) { 528 // Open the directory. 529 $av_dir = opendir( $avatar_folder_dir ); 530 if ( $av_dir ) { 530 531 531 532 // Stash files in an array once to check for one that matches. … … 566 567 } 567 568 } 568 } 569 570 // Close the avatar directory.571 closedir( $av_dir );569 570 // Close the directory. 571 closedir( $av_dir ); 572 } 572 573 573 574 // If we found a locally uploaded avatar. … … 856 857 } 857 858 858 if ( $av_dir = opendir( $avatar_folder_dir ) ) { 859 $av_dir = opendir( $avatar_folder_dir ); 860 if ( $av_dir ) { 859 861 while ( false !== ( $avatar_file = readdir( $av_dir ) ) ) { 860 862 if ( ( preg_match( '/-bpfull/', $avatar_file ) || preg_match( '/-bpthumb/', $avatar_file ) ) && '.' !== $avatar_file && '..' !== $avatar_file ) { … … 862 864 } 863 865 } 864 } 865 closedir( $av_dir ); 866 867 // Close the directory. 868 closedir( $av_dir ); 869 } 866 870 867 871 @rmdir( $avatar_folder_dir );
Note: See TracChangeset
for help on using the changeset viewer.