WordPress.org

Ready to get started?Download WordPress

Forums

MAJpage Menu Class Extender
[resolved] [PATCH] Only variables should be passed by reference (2 posts)

  1. flynsarmy
    Member
    Posted 11 months ago #

    PHP 5.4.10 on WP 3.6 with WP_DEBUG turned on. Getting the warning:

    Strict standards: Only variables should be passed by reference in /path/to/wp-content/plugins/majpage-menu-class-extender/majpage-menu-class-extender.php on line 21

    In function majpage_mce change

    list( , $item ) = each( $xml->xpath( 'ul' ) );
    if( ! $item )
    	list( , $item ) = each( $xml->xpath( 'menu' ) );

    to

    $elems = $xml->xpath( 'ul' );
    list( , $item ) = each( $elems );
    if( ! $item ) {
    	$elems = $xml->xpath( 'menu' );
    	list( , $item ) = each( $elems );
    }

    Annooying and wasteful but it'll stop your plugin filling up users' error logs with warnings.

    http://wordpress.org/plugins/majpage-menu-class-extender/

  2. duzymaju
    Member
    Plugin Author

    Posted 9 months ago #

    Hello flynsarmy,

    Thanks a lot for your notice. Today I corrected that strict standards warning's cause in new 1.4 plugin's version. :)

    There are also a number of other changes so I will be grateful for checking new version of plugin.

    If you have other suggestions connected with this plugin, I'll wait for your information. ;)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.