WordPress.org

Ready to get started?Download WordPress

Forums

Media Categories
Strict Standard notice (3 posts)

  1. truptig
    Member
    Posted 3 months ago #

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Media_Categories::enqueue_media_categories_styles() should not be called statically in E:\..\wp-includes\plugin.php on line 429

    The above warning is displayed on add/edit category, media page.

    https://wordpress.org/plugins/media-categories-2/

  2. bej-soan
    Member
    Posted 3 months ago #

    Got the exact the same message. Also displayed on post editor

  3. m.spierings
    Member
    Posted 2 months ago #

    Solution for this issue would be to add the following in the media-categories plugin folder in file 'media-categories.php:

    replace:
    function enqueue_media_categories_scripts() {
    with:
    public static function enqueue_media_categories_scripts() {

    and
    function enqueue_media_categories_styles() {
    with
    public static function enqueue_media_categories_styles() {

    That will remove the notice because now the function is called correctly.
    If you don't want to make functions static, use the New operator and then call the function (if I am not mistaken).

    Hope that Plugin developers can implement the change in the source.

    cheers

Reply

You must log in to post.

About this Plugin

About this Topic