• truptig

    (@truptig)


    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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • bej-soan

    (@bej-soan)

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

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Strict Standard notice’ is closed to new replies.