我一直在使用WPAlchemy類來創建在WordPress元盒,這一直很好,直到我升級到WordPress 3.6。錯誤與WPAchemy上升級到WordPress 3.6
升級後,我突然開始得到以下錯誤:
Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method WPAlchemy_MetaBox::_global_head() should not be called statically in /wp-includes/plugin.php on line 406
Strict Standards: Non-static method WPAlchemy_MetaBox::_is_post() should not be called statically in /wp-content/wpalchemy/MetaBox.php on line 1352
Strict Standards: Non-static method WPAlchemy_MetaBox::_is_post_or_page() should not be called statically in /wp-content/wpalchemy/MetaBox.php on line 986
Strict Standards: Non-static method WPAlchemy_MetaBox::_get_current_post_type() should not be called statically in /wp-content/wpalchemy/MetaBox.php on line 1024
Strict Standards: Non-static method WPAlchemy_MetaBox::_is_page() should not be called statically in /wp-content/wpalchemy/MetaBox.php on line 1352
Strict Standards: Non-static method WPAlchemy_MetaBox::_is_post_or_page() should not be called statically in /wp-content/wpalchemy/MetaBox.php on line 1005
Strict Standards: Non-static method WPAlchemy_MetaBox::_get_current_post_type() should not be called statically in /wp-content/wpalchemy/MetaBox.php on line 1024
這些錯誤會顯示我是否真正建立任何元框。
其他幾個人似乎有同樣的問題,但我一直沒能找到解決的辦法(比禁用錯誤報告,這是不是一個真正的解決方案等)。不幸的是,這超出了我基本的PHP技能。
我還沒有找到一個解決這個問題,但我注意到,如果我從5.4.10回滾我的PHP版本5.2.x中的錯誤不再顯示。 – PatrickSamphire