From 59d096e27012b80f5c0da73e65e1400da04b2ec5 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: http://core.svn.wordpress.org/trunk@22243 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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') ); } /**