Ticket #24639: 24639.diff
| File 24639.diff, 1.1 KB (added by , 13 years ago) |
|---|
-
wp-includes/theme.php
373 373 374 374 // Start with directories in the root of the current theme directory. 375 375 $dirs = @ scandir( $theme_root ); 376 if ( ! $dirs ) 377 return false; 376 if ( ! $dirs ) { 377 trigger_error( "$theme_root is not accessible", E_USER_NOTICE ); 378 continue; 379 } 378 380 foreach ( $dirs as $dir ) { 379 381 if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' ) 380 382 continue; … … 390 392 // wp-content/themes/a-folder-of-themes/* 391 393 // wp-content/themes is $theme_root, a-folder-of-themes is $dir, then themes are $sub_dirs 392 394 $sub_dirs = @ scandir( $theme_root . '/' . $dir ); 393 if ( ! $sub_dirs ) 394 return false; 395 if ( ! $sub_dirs ) { 396 trigger_error( "$theme_root/$dir is not readable", E_USER_NOTICE ); 397 continue; 398 } 395 399 foreach ( $sub_dirs as $sub_dir ) { 396 400 if ( ! is_dir( $theme_root . '/' . $dir . '/' . $sub_dir ) || $dir[0] == '.' || $dir == 'CVS' ) 397 401 continue;