diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php
index a03ccf9760..b5e775ab8b 100644
--- a/wp-includes/class-wp-image-editor-imagick.php
+++ b/wp-includes/class-wp-image-editor-imagick.php
@@ -735,22 +735,28 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* Checks for exact type due to: https://www.php.net/manual/en/function.file-put-contents.php
*/
if ( file_put_contents( $filename, $image->getImageBlob() ) === false ) {
- /* translators: %s: PHP function name. */
- return new WP_Error( 'image_save_error', sprintf( __( '%s failed while writing image to stream.' ), 'file_put_contents()
' ), $filename );
+ return new WP_Error(
+ 'image_save_error',
+ sprintf(
+ /* translators: %s: PHP function name. */
+ __( '%s failed while writing image to stream.' ),
+ 'file_put_contents()
'
+ ),
+ $filename
+ );
} else {
return true;
}
} else {
- $dir_name = dirname( $filename );
- $dir_exists = wp_mkdir_p( $dir_name );
+ $dirname = dirname( $filename );
- if ( ! $dir_exists ) {
+ if ( ! wp_mkdir_p( $dirname ) ) {
return new WP_Error(
'image_save_error',
sprintf(
/* translators: %s: Directory path. */
__( 'Unable to create directory %s. Is its parent directory writable by the server?' ),
- esc_html( $dir_name )
+ esc_html( $dirname )
)
);
}
@@ -801,13 +807,25 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
protected function strip_meta() {
if ( ! is_callable( array( $this->image, 'getImageProfiles' ) ) ) {
- /* translators: %s: ImageMagick method name. */
- return new WP_Error( 'image_strip_meta_error', sprintf( __( '%s is required to strip image meta.' ), 'Imagick::getImageProfiles()
' ) );
+ return new WP_Error(
+ 'image_strip_meta_error',
+ sprintf(
+ /* translators: %s: ImageMagick method name. */
+ __( '%s is required to strip image meta.' ),
+ 'Imagick::getImageProfiles()
'
+ )
+ );
}
if ( ! is_callable( array( $this->image, 'removeImageProfile' ) ) ) {
- /* translators: %s: ImageMagick method name. */
- return new WP_Error( 'image_strip_meta_error', sprintf( __( '%s is required to strip image meta.' ), 'Imagick::removeImageProfile()
' ) );
+ return new WP_Error(
+ 'image_strip_meta_error',
+ sprintf(
+ /* translators: %s: ImageMagick method name. */
+ __( '%s is required to strip image meta.' ),
+ 'Imagick::removeImageProfile()
'
+ )
+ );
}
/*
diff --git a/wp-includes/version.php b/wp-includes/version.php
index f01a49b77e..2f97816a74 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
-$wp_version = '5.6-beta3-49545';
+$wp_version = '5.6-beta3-49546';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.