On Fri, 8 Feb 2013, Hannes Magnusson wrote:

> > -  if(buf->pos - (buf->start + start) > max) {
> > -    zend_throw_exception_ex(mongo_ce_Exception, 5 TSRMLS_CC, "size of BSON doc is %d bytes, max is %d",
> > -                            buf->pos - (buf->start + start), max);
> > -    return FAILURE;
> > -  }
> > -
> > -  return php_mongo_serialize_size(buf->start + start, buf TSRMLS_CC);
> > +static int insert_helper(buffer *buf, zval *doc, int max TSRMLS_DC)
> > +{
> > +	int start = buf->pos - buf->start;
> > +	int result = zval_to_bson(buf, HASH_P(doc), PREP TSRMLS_CC);
> > +
> > +	/* throw exception if serialization crapped out */
> > +	if (EG(exception) || FAILURE == result) {
> > +		return FAILURE;
> > +	} else if (0 == result) { /* return if there were 0 elements */
> 
> that seems to be the only comment that is on the same line as an else if

Fixed (once I commit and push)