From 655a2e51e76f3fbef568d61afc1bc32d91cdd2d8 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 16 Oct 2012 13:46:00 +0000 Subject: [PATCH] Return WP_Error when no editor is selected. Props markoheijnen. see #6821 git-svn-id: https://develop.svn.wordpress.org/trunk@22243 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-image-editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/class-wp-image-editor.php b/wp-includes/class-wp-image-editor.php index 83c6b94e0a..6ee94a28f4 100644 --- a/wp-includes/class-wp-image-editor.php +++ b/wp-includes/class-wp-image-editor.php @@ -45,7 +45,7 @@ abstract class WP_Image_Editor { return $editor; } - return false; + return new WP_Error( 'no_editor', __('No editor could be selected') ); } /**