Coding Standards: Remove unnecessary try/catch block in `wp_get_webp_info()`.
This appears to be redundant, as none of the functions used inside the block throw an exception. Follow-up to [50810]. See #54728. Built from https://develop.svn.wordpress.org/trunk@52717 git-svn-id: http://core.svn.wordpress.org/trunk@52306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
11691e8207
commit
c128cd263a
|
@ -5235,9 +5235,12 @@ function wp_get_webp_info( $filename ) {
|
|||
return compact( 'width', 'height', 'type' );
|
||||
}
|
||||
|
||||
try {
|
||||
$handle = fopen( $filename, 'rb' );
|
||||
if ( $handle ) {
|
||||
|
||||
if ( false === $handle ) {
|
||||
return compact( 'width', 'height', 'type' );
|
||||
}
|
||||
|
||||
$magic = fread( $handle, 40 );
|
||||
fclose( $handle );
|
||||
|
||||
|
@ -5274,9 +5277,6 @@ function wp_get_webp_info( $filename ) {
|
|||
$type = 'animated-alpha';
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch ( Exception $e ) {
|
||||
}
|
||||
|
||||
return compact( 'width', 'height', 'type' );
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52708';
|
||||
$wp_version = '6.0-alpha-52717';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue