`WP_Error` is a PHP class used by the WordPress core for error reporting.

learn more… | top users | synonyms

0
votes
1answer
23 views

Why is_wp_error() is not returning false even there's no defined error

On the form submission I'm taking user comment for a custom purpose for my plugin. I'm checking whether the comment field is empty or not, and the comment field is filled with at least 30 characters. ...
0
votes
1answer
32 views

disable WP_error: authentication_failed

I am modifying my wp-login.php but from within functions.php (in order not to hack the core). I need to disable one WP_error with code: authentication_failed. if i hack the core and modify ...
0
votes
1answer
112 views

Cannot use object of type WP_Error as array

Using a WordPress Plugin WPML I have been getting this error on saving a draft post: PHP Fatal error: Cannot use object of type WP_Error as array in ...
0
votes
1answer
395 views

Error timed out with succesfull wp_remote_post

What I'm trying to do: Passing POST data by using wp_remote_post. foreach ( $articles as $article_id ) { $postarray = array( 'method' => 'POST', 'timeout' => 5, ...
0
votes
1answer
2k views

Object of class WP_Error could not be converted to string

After deleting some categories (shouldn't have done this), I get the following error Catchable fatal error: Object of class WP_Error could not be converted to string in [FILENAME] on line 45 ...
0
votes
0answers
45 views

Authenticate return value

I am trying to hook into the authenticate return value to display error message on custom login form. The $user object is not returned. add_action( 'authenticate', 'my_login_check' ); function ...
0
votes
1answer
1k views

get_term_children for immediate children only (not grandchildren)

I want to display term children of a custom taxonomy. Currently, I am able to do this using get_term_children, but using this, it displays children and grandchildren, I want to avoid this and make ...
1
vote
1answer
239 views

Get errors from WP_Error to different variables

I have added multiple errors in the WP_ERROR. I want to get those errors separately in different variables. With the following code I can get all errors with foreach loop, but how can I assign them to ...
0
votes
2answers
213 views

Featured Image not shown and getting error “Object of class WP_Error could not be converted to int”

First of all I'm using twentyeleven theme, I created a custom template page to insert posts. It has 4 submit forms. it is working well, also setting feature image is ok for 3 forms except the first ...
0
votes
1answer
186 views

Catchable fatal error on 3.6 update

Trying to debug the situation. Getting close, but will need a little help!! Here is the error: Catchable fatal error: Object of class WP_Error could not be converted to string in ...
0
votes
2answers
280 views

WP_Error not displaying errors

I am trying to utilize WP_Error for my plugin, but nothing happens. Is this too late for WP_Error? Too early? Or am I doing something else wrong? function cpt_pre_post_publish(){ return new ...
0
votes
1answer
448 views

How To Pass Array To get_the_category_by_ID() and Get An Array Back?

I am trying to pass an array of category IDs to get_category_by_ID() in order to get an array of category names back. Since I'm still trying to get this to work I'm just using var_dump() on the ...
0
votes
1answer
132 views

How to generate “WP_Error” Object for user login?

I want to return the Login Error Message even user key-in their privileges correctly. In other words, to terminate the login and show the error message. When we key-in wrong passwords, wordpress ...
1
vote
1answer
298 views

Checking return with WP Error

I've seen other people with similar problems, and I know that I need to check the return when calling for the child items in my custom taxonomy "hhie_artists". I'm not sure how to echo my output to ...
1
vote
1answer
5k views

How to display error messages using WP_Error class?

I have registration form code in my functions.php file like this if ('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['action'] == 'registration') { ...