After [45538]: fix another WPCS "strict comparison" fix.

Props birgire.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45540


git-svn-id: http://core.svn.wordpress.org/trunk@45351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-06-15 16:24:52 +00:00
parent 5987caeecc
commit da7839dc45
2 changed files with 19 additions and 17 deletions

View File

@ -781,9 +781,10 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
$filepath = get_attached_file( $attachment_id ); $filepath = get_attached_file( $attachment_id );
if ( $filepath && file_exists( $filepath ) ) { if ( $filepath && file_exists( $filepath ) ) {
if ( 'full' !== $size ) {
$data = image_get_intermediate_size( $attachment_id, $size ); $data = image_get_intermediate_size( $attachment_id, $size );
if ( 'full' != $size && $data ) { if ( $data ) {
$filepath = path_join( dirname( $filepath ), $data['file'] ); $filepath = path_join( dirname( $filepath ), $data['file'] );
/** /**
@ -799,7 +800,8 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
*/ */
$filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size ); $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size );
} }
} elseif ( function_exists( 'fopen' ) && true === ini_get( 'allow_url_fopen' ) ) { }
} elseif ( function_exists( 'fopen' ) && ini_get( 'allow_url_fopen' ) ) {
/** /**
* Filters the image URL if not in the local filesystem. * Filters the image URL if not in the local filesystem.
* *

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-45539'; $wp_version = '5.3-alpha-45540';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.