• Resolved coretechs

    (@coretechs)


    Class-listing-db.php has unnecessary line of code that causes PHP errors on our site.

    Got error ‘PHP message: PHP Warning: in_array() expects parameter 2 to be array, string given in /var/www/clients/client182/web225/web/wp-content/plugins/directorist/includes/classes/class-listing-db.php on line 127

    On Line 120 the variable $fav_listing is already set and does not need to be set again online line 126.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter coretechs

    (@coretechs)

    Line 121 should change to this.

    $fav_listing = !empty($fav_listing)?$fav_listing:$fav_listing = array();

    Hi @coretechs,

    Thank you for the tip, I’ll be sure to pass it on to our dev team. By the way, did you know Directorist is open-source? If you want, you can fork the project, make changes and give a Pull Request, we’ll be happy to have some contributors. Here’s the git repo: https://github.com/sovware/directorist

    Thank you again!

    Regards,
    Mahdi.

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

The topic ‘PHP Error when editing listing’ is closed to new replies.