ErrorException in_array()

I am using Kirby Version 3.4.2.

Whenever I update the status of a page to listed or published I see the following error when trying to save changes. The changes are saved though.

Exception: Whoops\Exception\ErrorException
in_array() expects parameter 2 to be array, string given

Could you share browser console output after getting error, please? There is more detailed information there.

    "status": "error",
    "message": "in_array() expects parameter 2 to be array, string given",
    "code": 2,
    "exception": "Whoops\\Exception\\ErrorException",
    "key": null,
    "file": "site/plugins/komments/utils/sendWebmention.php",
    "line": 60,
    "details": [],
    "route": "pages/([a-zA-Z0-9\\.\\-_%= \\+\\@\\(\\)]+)"

Maybe this is a problem with the Komments-Plugin?

Absolutely yes!

Check the 60. line of site/plugins/komments/utils/sendWebmention.php file.

Following line is wrong:

$whitelist = option('mauricerenck.komments.send-limit-to-templates', true);

Correct is:

$whitelist = option('mauricerenck.komments.send-limit-to-templates', []);

Also mauricerenck.komments.send-limit-to-templates option should be array. I guess this option is string in your config.

To fix the issuue pinging @mauricehh to be sure the option is array.

1 Like

Thank you for the quick help!

Thank you for letting me know, working on a bugfix release.