Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

Symfony 4 : Unsezialise() , ["allowed_classes" => false] error

$
0
0

(My english are bad, hope you will understand)

Hello, I'm actualy developping an website with Synfony 4 and created an admin login. I used serialise and unserialise.

  /**
     * @inheritDoc
     */
    public function serialize()
    {
        // TODO: Implement serialize() method.
        return serialize([
            $this->id,
            $this->username,
            $this->password
        ]);
    }

    /**
     * @inheritDoc
     */
    public function unserialize($serialized)
    {
        // TODO: Implement unserialize() method.
        list(
            $this->id,
            $this->username,
            $this->password
            ) = $this->unserialize($serialized, ["allowed_classes" => false]);
    }

At the end $this->unserialize($serialized, ["allowed_classes" => false]); doesn't work because "Method call is provided 2 parameters, but the method signature uses 1 parameters" (Intellij IDEA) I don't understand what that means and don't find anything about that.

I think that the basics methods just want unserialize($serialized) or something like that but when I fill the form and send it nothing happens.

Thank you for your reply.


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>