当我激活插件时: SEO Facebook Comments 代替页面评论时出现错误:
致命错误:在第 0 行的 Unknown 中抛出没有堆栈帧的异常
然后当我启用 WP_DEBUG 我得到:
( ! ) Notice: register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.) in C:\wamp\www\wp-includes\functions.php on line 2944
Call Stack
# Time Memory Function Location
1 0.0005 365640 {main}( ) ..\index.php:0
2 0.0008 369280 require( 'C:\wamp\www\wp-blog-header.php' ) ..\index.php:17
3 0.0013 389656 require_once( 'C:\wamp\www\wp-load.php' ) ..\wp-blog-header.php:12
4 0.0019 405168 require_once( 'C:\wamp\www\wp-config.php' ) ..\wp-load.php:29
5 0.0028 508984 require_once( 'C:\wamp\www\wp-settings.php' ) ..\wp-config.php:92
6 0.2159 24384776 include_once( 'C:\wamp\www\wp-content\plugins\seo-facebook-comments\seofacebook.php' ) ..\wp-settings.php:195
7 0.2205 24806704 SEOFacebookComments->__construct( ) ..\seofacebook.php:594
8 0.2213 24816992 register_uninstall_hook( ) ..\seofacebook.php:95
9 0.2213 24817224 _doing_it_wrong( ) ..\plugin.php:679
10 0.2213 24818200 trigger_error ( ) ..\functions.php:2944
当我检查wp-content\plugins\seo-facebook-comments\seofacebook.php第 195 行时:
wp_register_style('fbSEOStylesheet', $fbSEOStyleURL);
有什么想法有什么问题,或者我可以在哪里开始调试以找到错误?
使用最新版本的 WordPress。
更新:当我搜索插件目录时,我找到了 register_untilstall_hook 的 1 个实例
register_activation_hook( __FILE__, array( &$this, 'install' ) );
register_deactivation_hook( __FILE__, array( &$this, 'remove' ) );
register_uninstall_hook( __FILE__, array( &$this, 'remove' ) );
更新 2:我能够修复以下错误:https ://stackoverflow.com/a/11976433/560287但我仍然在评论部分收到原始错误。关于这可能是什么的任何想法?