You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cloner mechanism could detect such classes with an allowlist of them (currently that list will be short: ["mysqli_driver"]) and query the properties each time they need to be accessed instead of trying to store and determine a value.
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
6.0.3
Description
The
mysqli_driver
class implements what's documented as a monostate pattern: every instance of that class shares the same state.As shown at mysqli_driver.c, properties are checked when they are accessed, not at object initialization.
When dumping, the clone ignores some values but more importantly, puts a 0 value for report_mode instead the actual reporting value configured.
How to reproduce
Code
Expected
An output similar to
var_dump($driver)
:Actual
Possible Solution
The cloner mechanism could detect such classes with an allowlist of them (currently that list will be short: ["mysqli_driver"]) and query the properties each time they need to be accessed instead of trying to store and determine a value.
Additional Context
Initially detected in psysh: bobthecow/psysh#706
The text was updated successfully, but these errors were encountered: