• On all sites I want to use the plugin I get next error message, even when I use the best WordPress theme to test (twenty seventeen):

    “Warning: in_array() expects parameter 2 to be array, null given in /srv/disk14/1574778/www/mydomain.com/wp-content/plugins/favorites/app/Entities/User/UserRepository.php on line 188”

    Please why do I get it and how can I fix it?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Van Hooreweder

    (@hoore)

    On the main site when logged in there is no error message. But the error message is there again when logged out.

    Please, how can I fix it?

    I have same issue! Need fix!

    crest1314

    (@crest1314)

    I fixed this problem by adding some code in the /plugins/favorites/app/Entities/User/UserRepository.php

    if($favorites==null){
    $favorites = [];
    }

    Hi crest1314,

    Where in the file did you put this code?

    Replace line 188 or somewhere else?

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Why do I have this error message?’ is closed to new replies.