8000 [VarExporter] Fix calling `parent::__wakeup()` when unserializing with LazyProxyTrait by azjezz · Pull Request #48553 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[VarExporter] Fix calling parent::__wakeup() when unserializing with LazyProxyTrait #48553

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

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: fix syntax error
`parent:` was getting parsed as a goto label, and `__wakeup()` as a function call.

this would result in a runtime error once this code branch is reached.

ref: https://twitter.com/azjezz/status/1600870101606989824
  • Loading branch information
azjezz authored Dec 8, 2022
commit d2a5592deb538f5c7ffe6b65f07a14ce8e320cf6
2 changes: 1 addition & 1 deletion src/Symfony/Component/VarExporter/LazyProxyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public function __unserialize(array $data): void
PublicHydrator::hydrate($this, $data);

if (Registry::$parentMethods[$class]['wakeup']) {
parent:__wakeup();
parent::__wakeup();
}
}
}
Expand Down
0