当我将PHP错误报告置于我的WordPress安装程序中时,我不断收到此错误。错误:只应通过wp-includes/post.php中的引用返回变量引用
Notice: Only variable references should be returned by reference in /Users/admin/Sites/wp-includes/post.php on line 3394
我有它与分类及其层级设置做的感觉。
一直试图追查一下现在在我正在写的插件。
这些是WP Core中的实际代码行,返回值位于excact行。
// Make sure the post type is hierarchical
$hierarchical_post_types = get_post_types(array('hierarchical' => true));
if (!in_array($post_type, $hierarchical_post_types))
return false;
我会继续调试它,直到我发现这个问题,但是任何输入将是我没有在我的插件就找到了问题的高度视宁度。
也许你的插件调用了一个WP核心函数错误并导致了错误(有时候使用jQuery)。查看回溯,找出在WP核心功能之前调用的功能。你可以使用'debug_print_backtrace()'; http://www.php.net/manual/en/function.debug-print-backtrace.php – 2012-08-13 08:58:55