Fix notice when not scanning any files Closes #5465

This commit is contained in:
Mike Jolley 2014-05-12 12:34:42 +01:00
parent c5c81c0818
commit 19625d17bb
1 changed files with 3 additions and 1 deletions

View File

@ -457,10 +457,12 @@
<?php <?php
$template_paths = apply_filters( 'woocommerce_template_overrides_scan_paths', array( 'WooCommerce' => WC()->plugin_path() . '/templates/' ) ); $template_paths = apply_filters( 'woocommerce_template_overrides_scan_paths', array( 'WooCommerce' => WC()->plugin_path() . '/templates/' ) );
$scanned_files = array();
$found_files = array(); $found_files = array();
foreach ( $template_paths as $plugin_name => $template_path ) foreach ( $template_paths as $plugin_name => $template_path ) {
$scanned_files[ $plugin_name ] = $this->scan_template_files( $template_path ); $scanned_files[ $plugin_name ] = $this->scan_template_files( $template_path );
}
foreach ( $scanned_files as $plugin_name => $files ) { foreach ( $scanned_files as $plugin_name => $files ) {
foreach ( $files as $file ) { foreach ( $files as $file ) {