Additional work on plugins after upgraded to WP 3.6

I’ve just finished upgrade WP 3.6 and related plugins. There are two plugins generate Error message

PHP Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GoogleSitemapGeneratorLoader::Enable() should not be called statically in /wp-includes/plugin.php on line 406, referer: http://www.refmanual.com/wp-admin/plugin-editor.php?file=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-core.php&plugin=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-ui.php

PHP Strict Standards: Non-static method GoogleSitemapGeneratorLoader::GetBaseName() should not be called statically in /wp-content/plugins/google-xml-sitemaps-v3-for-qtranslate/sitemap.php on line 114, referer: http://www.refmanual.com/wp-admin/plugin-editor.php?file=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-core.php&plugin=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-ui.php

PHP Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GoogleSitemapGeneratorLoader::CallHtmlShowHelpList() should not be called statically in /wp-includes/plugin.php on line 173, referer: http://www.refmanual.com/wp-admin/plugin-editor.php?file=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-core.php&plugin=google-xml-sitemaps-v3-for-qtranslate%2Fsitemap-ui.php

PHP Strict Standards: Declaration of W3_Cache_Memcached::delete() should be compatible with W3_Cache_Base::delete($key, $group = '') in /wp-content/plugins/w3-total-cache/lib/W3/Cache/Memcached.php on line 15, referer: http://www.refmanual.com/wp-admin/plugins.php

After investigation, there are two plugins “google-xml-sitemaps-v3-for-qtranslate” and “w3-total-cache” report error.

First, google-xml-sitemaps complain a non-static method called statically…hmmm. so, i make a quick dirty fix as following:-

sitemap-core.php: public static function Enable() {
sitemap.php: public static function Enable() {
sitemap.php: public static function AddMultisiteWarning() {
sitemap.php: public static function RegisterAdminPage() {
sitemap.php: public static function RegisterAdminIcon($hook) {
sitemap.php: public static function RegisterPluginLinks($links, $file) {
sitemap.php: public static function CallHtmlShowOptionsPage() {
sitemap.php: public static function CallCheckForAutoBuild($args) {
sitemap.php: public static function CallBuildNowRequest() {
sitemap.php: public static function CallBuildSitemap() {
sitemap.php: public static function CallCheckForManualBuild() {
sitemap.php: public static function CallShowPingResult() {
sitemap.php: public static function CallHtmlShowHelpList($filterVal,$screen) {
sitemap.php: public static function CallDoRobots() {
sitemap.php: public static function LoadPlugin() {
sitemap.php: public static function GetBaseName() {
sitemap.php: public static function GetPluginFile() {
sitemap.php: public static function GetVersion() {

Simply make those non-static method become static, and no more complain in this plugin now.

For w3-total-cache, it complain the ancestor class Delete() in Base.php has two arguments, but Memcache.php contain only ONE. And because I’m using memcached, so I apply another dirty fix as follow:-

##lib/W3/Cache/Base.php
/* function delete($key, $group = '') { */
function delete($key) {

Ancestor and descendant are compatible now.

Although both “fix” are quite dirty, but I’m sure it will help you to get through the problem before author provide new patch.

1 thought on “Additional work on plugins after upgraded to WP 3.6

Leave a Reply

Your email address will not be published. Required fields are marked *