Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unserialization failure after upgrading to 3.7.0 (excludeIf related?) #1207

Closed
benjamintoussaint opened this issue May 25, 2020 · 2 comments
Closed

Comments

@benjamintoussaint
Copy link

Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no

Steps required to reproduce the problem

  1. Upgrade from 3.6.0 to 3.7.0

Expected Result

  • A working unserialization

Actual Result

  • Error when unserializing:
    {"code":500,"message":"Notice: Undefined offset: 15"}

The excludeIf data appears to be missing from the $unserialized variable which apparently cause the $excludeIf property to be accidentally populated with the parentStr while that $parentStr data is missing at offset 15:

public function unserialize($str)
{
    $unserialized = unserialize($str);

    [
        $this->preSerializeMethods,
        $this->postSerializeMethods,
        $this->postDeserializeMethods,
        $this->xmlRootName,
        $this->xmlRootNamespace,
        $this->xmlNamespaces,
        $this->accessorOrder,
        $this->customOrder,
        $this->discriminatorDisabled,
        $this->discriminatorBaseClass,
        $this->discriminatorFieldName,
        $this->discriminatorValue,
        $this->discriminatorMap,
        $this->discriminatorGroups,
        $this->excludeIf,
        $parentStr,
    ] = $unserialized;

This bug might be linked to f114dc6#diff-97e8439543c1cb6420f2765cc67bab32.

@goetas
Copy link
Collaborator

goetas commented May 25, 2020

Did you clear the cache?

@goetas
Copy link
Collaborator

goetas commented May 25, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants