evseevnn-zz / php-cassandra-binary

PHP library for Cassandra database via a binary protocol.
http://evseevnn.github.io/php-cassandra-binary/
MIT License
69 stars 33 forks source link

do not set a value if the column length is -1 #55

Closed pascaln closed 9 years ago

pascaln commented 9 years ago

If the value of a field is null the length is -1. So the following byte should not be readed. I've testet it with Cassandra Version 2.

Regards, Pascal

fabianosim commented 9 years ago

In Cassandra version 2.0.11.83 everything is working fine with your fix. Thank you very much! I've tested with PHP version 5.4.14 on Windows and Linux. Master commit is bugged, but this fix solves everything. Please evseevnn, merge the pull request rom pascaln in master.

Thank you,

Fabiano