當我將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