WordPress.org

Support

Support » Plugins and Hacks » Some PHP warnings when debug enabled

Some PHP warnings when debug enabled

  • Hello, just to let you know, using WordPress in debugging mode by enabling “define(‘WP_DEBUG’, true);” in wp-config.php, I came across some php warnings when using the MSLS plugin. I’m using PHP 5.4.

    The warnings are:
    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method MslsPlugin::init_widget() should not be called statically in /Users/ehuang/Documents/apache-doc-root/wordpress/wp-includes/plugin.php on line 406

    Strict Standards: Accessing static property MslsRegistry::$arr as non static in /Users/ehuang/Documents/apache-doc-root/wordpress/wp-content/plugins/multisite-language-switcher/includes/MslsRegistry.php on line 42

    Strict Standards: Accessing static property MslsRegistry::$arr as non static in /Users/ehuang/Documents/apache-doc-root/wordpress/wp-content/plugins/multisite-language-switcher/includes/MslsRegistry.php on line 52

    Strict Standards: Static function MslsMain::init() should not be abstract in /Users/ehuang/Documents/apache-doc-root/wordpress/wp-content/plugins/multisite-language-switcher/includes/MslsMain.php on line 24

    They are fixed easily enough. If you need more details I can send you some.

    Great plugin by the way.

    http://wordpress.org/plugins/multisite-language-switcher/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Dennis Ploetner

    @realloc

    Thanks for your message. My working copy here runs on a system which has debug mode activated. So the new version will not produce warnings like this.

    Cheers,
    Dennis.

    Ok, that’s great.

    In case you haven’t seen this yet, I got another debug message after editing a page:
    Notice: Undefined offset: 0 in /Users/ehuang/Documents/apache-doc-root/wordpress/wp-includes/capabilities.php on line 1070

    This is coming from MslsMetaBox.php
    this:
    if ( !current_user_can( ‘edit_page’ ) )
    should be replaced with:
    if ( !current_user_can( ‘edit_page’, $post_id ) ) {

    Hello and thanks for this plugin. I have the same error, when do you plan to release the new version?
    I need to go to production this week, and now the plugin is not working.
    Thanks!

    Plugin Author Dennis Ploetner

    @realloc

    @jaime8111 Please set the error reporting to E_ALL ^ E_NOTICE in production. These are just warnings so there is nothing that should bring you to the conclusion that the plugin is not working.

    The next version comes in the next weeks.

    Cheers,
    Dennis.

    I was just about to report this as well. Glad to see you are on top of this realloc! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Some PHP warnings when debug enabled’ is closed to new replies.