Skip to content

Serialize issue #80

Description

@rlalak

I found issue in serialize function. When I try to serialize object with unseted field I got the error:
[msgpack] (msgpack_serialize_zval) type is unsupported, encoded as null

Example code:

class MyClass
{
  protected $field;

  public function preSerialize()
  {
    unset($this->field);
  }
}

$t = new MyClass();
$t->preSerialize();
msgpack_serialize($t);

PHP Version 7.0.3
msgpack version 2.0.0 (header version 0.5.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions