Skip to content

Commit df0ff2b

Browse files
committed
Merge pull request #465
2 parents 6bfddea + c546045 commit df0ff2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bson.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ PHP_FUNCTION(fromJSON)
16791679
PHONGO_RETVAL_STRINGL((const char *) bson_get_data(&b), b.len);
16801680
bson_destroy(&b);
16811681
} else {
1682-
phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE TSRMLS_CC, "%s", error.message ? error.message : "Error parsing JSON");
1682+
phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE TSRMLS_CC, "%s", error.domain == BSON_ERROR_JSON ? error.message : "Error parsing JSON");
16831683
}
16841684
}
16851685
/* }}} */

0 commit comments

Comments
 (0)