我一直在使用WPAlchemy类在 WordPress 中创建元框,这一直很好,直到我升级到 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 技能。