stanley-cheung / Protobuf-PHP

PHP implementation of Google's Protocol Buffers with a protoc plugin compiler
http://drslump.github.com/Protobuf-PHP/
MIT License
22 stars 11 forks source link

Bug in _get method: for bool(false) and int(0) returns NULL #20

Open ghost opened 6 years ago

ghost commented 6 years ago
public function _get($tag, $idx = null)
    {
        $f = $this->_descriptor->getField($tag);

        if (!$f) {
            return null;
        }

!$f - true if false or 0! It returns NULL instead of false or 0