Ticket #55069: 0002-class-wp-filesystem-direct-remove-unnecessary-is_dir.2.patch
File 0002-class-wp-filesystem-direct-remove-unnecessary-is_dir.2.patch, 1.6 KB (added by , 3 years ago) |
---|
-
src/wp-admin/includes/class-wp-filesystem-direct.php
606 606 $limit_file = false; 607 607 } 608 608 609 if ( ! $this->is_dir( $path ) || ! $this->is_readable( $path ) ) { 610 return false; 611 } 609 /* 610 * Silencing notice and warning is intentional to avoid extra system calls. 611 * See https://core.trac.wordpress.org/ticket/55069 612 */ 613 $dir = @dir( $path ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 612 614 613 $dir = dir( $path );614 615 615 if ( ! $dir ) { 616 616 return false; 617 617 } -
src/wp-admin/includes/class-wp-filesystem-ssh2.php
756 756 $limit_file = false; 757 757 } 758 758 759 if ( ! $this->is_dir( $path ) || ! $this->is_readable( $path ) ) { 759 /* 760 * Silencing notice and warning is intentional to avoid extra system calls. 761 * See https://core.trac.wordpress.org/ticket/55069 762 */ 763 $dir = @dir( $this->sftp_path( $path ) ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 764 765 if ( ! $dir ) { 760 766 return false; 761 767 } 762 768 763 769 $ret = array(); 764 $dir = dir( $this->sftp_path( $path ) );765 770 766 if ( ! $dir ) {767 return false;768 }769 770 771 while ( false !== ( $entry = $dir->read() ) ) { 771 772 $struc = array(); 772 773 $struc['name'] = $entry;