尝试添加新帖子时出现以下php错误:
警告:array\\u pop()要求参数1为数组,布尔值在/home/mysite/public\\u html/blog/wp content/themes/mytheme/functions中给出。php在线675
功能如下:
function glossary_term_permalink($post_link, $post, $leavename, $sample) {
if (false !== strpos($post_link, \'%recipe_cat%\')) {
$glossary_letter = get_the_terms($post->ID, \'recipe_cat\');
$post_link = str_replace(\'%recipe_cat%\', array_pop($glossary_letter)->slug, $post_link);
}
return $post_link;
}
知道问题是什么以及如何解决吗?