~canonical-sysadmins/wordpress/4.7

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-upgrader.php

  • Committer: Ryan Finnie
  • Date: 2015-08-31 16:03:58 UTC
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: ryan.finnie@canonical.com-20150831160358-32iuabgkh61u3sme
new upstream release 4.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
972
972
 
973
973
                // Check the folder contains at least 1 valid plugin.
974
974
                $plugins_found = false;
975
 
                foreach ( glob( $working_directory . '*.php' ) as $file ) {
976
 
                        $info = get_plugin_data($file, false, false);
977
 
                        if ( !empty( $info['Name'] ) ) {
978
 
                                $plugins_found = true;
979
 
                                break;
 
975
                $files = glob( $working_directory . '*.php' );
 
976
                if ( $files ) {
 
977
                        foreach ( $files as $file ) {
 
978
                                $info = get_plugin_data( $file, false, false );
 
979
                                if ( ! empty( $info['Name'] ) ) {
 
980
                                        $plugins_found = true;
 
981
                                        break;
 
982
                                }
980
983
                        }
981
984
                }
982
985