Cannot use object of type WP_Error
Question
function im_add_new_term($name,$tax){
if($tax == "genre"){
return wp_insert_term($name,$tax,array("slug"=>array_search ($name, $genres)))["term_id"];
} else {
return wp_insert_term($name,$tax)["term_id"];
}
}
Fatal error: Cannot use object of type WP_Error as array in
/home/pcodecom/demo.p30code.com/multimedia-2/wp-content/plugins/imdb/imdb.php
on line 11
0
wp-error
3 years
2020-04-04T04:52:03-05:00
2020-04-04T04:52:03-05:00 0 Answers
77 views
0
Leave an answer