serggp
serggp
Sure, you are right. It's better to check if a value is null.
Thank you
@willgrnr Looks like you were trying to compile it for php7. Current version supports php5 only. Php7 support is implemented in pull request https://github.com/allegro/php-protobuf/pull/63
Or you can use this workaround: ``` $clonedFoo = new Foo(); $clonedFoo->parseFromString($foo->serializeToString()); ```
You can try php7 support here: https://github.com/serggp/php-protobuf/tree/php7 Pull request: https://github.com/allegro/php-protobuf/pull/63 Please let me know if something goes wrong
@cjhlai Looks like you were trying to compile the extension using master branch. Please make sure you are using php7 branch.
@cjhlai Your error message contains the following line: /root/Downloads/php-protobuf/protobuf.c:104 Take a look at this line in master branch: 104: zval_ptr_dtor(&val); And then take a look at this line in php7...
@techkey Thank you for pointing that out. It won't work for all platforms where sizeof(long) != sizeof(zend_long). However in most x64 cases they are equal and that's why I missed...
@techkey I've replaced all long values. Now it works for both x86 and x64.
@techkey Thank you for your report. I'll try to fix it as soon as possible. Btw, which test keeps failing besides 'packed field serialization'? I launched all the tests on...