Skip to content
Open
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
2 changes: 1 addition & 1 deletion kphp_polyfills.php
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ function _php_serialize_helper_run_or_warning(callable $fun) {
}
}

function instance_serialize(object $instance): ?string {
function instance_serialize(?object $instance): ?string {
KPHP\InstanceSerialization\ClassTransformer::$depth = 0;
return _php_serialize_helper_run_or_warning(static function() use ($instance) {
$packer = (new MessagePack\Packer(MessagePack\PackOptions::FORCE_STR))->extendWith(new KPHP\InstanceSerialization\ClassTransformer());
Expand Down