We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example:
$test = [ 'time' => new \DateTime('2001-10-10') ]; $function_that_will_produce_invalid_closure = function() use($test) { return $test; } serialize(new SerializableClosure($function_that_will_produce_invalid_closure ));
Expected Result: C:32:"Opis\Closure\SerializableClosure":324:{a:5:{s:3:"use";a:1:{s:4:"test";a:1:{s:4:"time";O:8:"DateTime":3:{s:4:"date";s:26:"2001-10-10 00:00:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}}s:8:"function";s:59:"function() use($test) { return $test; }";s:5:"scope";N;s:4:"this";N;s:4:"self";s:32:"000000003d57f521000000006e745c4b";}}
C:32:"Opis\Closure\SerializableClosure":324:{a:5:{s:3:"use";a:1:{s:4:"test";a:1:{s:4:"time";O:8:"DateTime":3:{s:4:"date";s:26:"2001-10-10 00:00:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}}s:8:"function";s:59:"function() use($test) { return $test; }";s:5:"scope";N;s:4:"this";N;s:4:"self";s:32:"000000003d57f521000000006e745c4b";}}
Actual Result: C:32:"Opis\Closure\SerializableClosure":229:{a:5:{s:3:"use";a:1:{s:4:"test";a:1:{s:4:"time";O:8:"DateTime":0:{}}}s:8:"function";s:59:"function() use($test) { return $test; }";s:5:"scope";N;s:4:"this";N;s:4:"self";s:32:"00000000535ee1e0000000001c44dfb8";}}
C:32:"Opis\Closure\SerializableClosure":229:{a:5:{s:3:"use";a:1:{s:4:"test";a:1:{s:4:"time";O:8:"DateTime":0:{}}}s:8:"function";s:59:"function() use($test) { return $test; }";s:5:"scope";N;s:4:"this";N;s:4:"self";s:32:"00000000535ee1e0000000001c44dfb8";}}
The code at fault seems to be this line. As soon as it finds out that it is an internalObject it doesn't assign any value to $data
$data
if(!$reflection->isUserDefined()) { break; }
The text was updated successfully, but these errors were encountered:
Fixed in v3.0.12
Sorry, something went wrong.
No branches or pull requests
Example:
Expected Result:
C:32:"Opis\Closure\SerializableClosure":324:{a:5:{s:3:"use";a:1:{s:4:"test";a:1:{s:4:"time";O:8:"DateTime":3:{s:4:"date";s:26:"2001-10-10 00:00:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}}}s:8:"function";s:59:"function() use($test) { return $test; }";s:5:"scope";N;s:4:"this";N;s:4:"self";s:32:"000000003d57f521000000006e745c4b";}}
Actual Result:
C:32:"Opis\Closure\SerializableClosure":229:{a:5:{s:3:"use";a:1:{s:4:"test";a:1:{s:4:"time";O:8:"DateTime":0:{}}}s:8:"function";s:59:"function() use($test) { return $test; }";s:5:"scope";N;s:4:"this";N;s:4:"self";s:32:"00000000535ee1e0000000001c44dfb8";}}
The code at fault seems to be this line. As soon as it finds out that it is an internalObject it doesn't assign any value to
$data
The text was updated successfully, but these errors were encountered: