luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

RobotsFilter / Contact Form: Argument 2 is not an array. #1918

Closed JohnnyMcWeed closed 5 years ago

JohnnyMcWeed commented 5 years ago

What steps will reproduce the problem?

Adding the contact form as a module to a page.

What is the expected result?

The module will show up as expected. (It did before, but doesn't after the update.)

What do you get instead?

PHP Warning – yii\base\ErrorException array_merge(): Argument 2 is not an array

vendor\luyadev\luya-core\web\filters\RobotsFilter.php

/**
     * Render Time Setter.
     *
     * @param integer $time Set the last action timestamp.
     */
    protected function setRenderTime($time)
    {
        $merge = Yii::$app->session->get(self::ROBOTS_FILTER_SESSION_IDENTIFIER, []);
        Yii::$app->session->set(self::ROBOTS_FILTER_SESSION_IDENTIFIER, array_merge([$this->getSessionKeyByOwner() => $time], $merge));
    }
nadar commented 5 years ago

what of you cleanup the session cookie?

JohnnyMcWeed commented 5 years ago

Sorry, works, thanks :)