We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6bfddea + c546045 commit df0ff2bCopy full SHA for df0ff2b
src/bson.c
@@ -1679,7 +1679,7 @@ PHP_FUNCTION(fromJSON)
1679
PHONGO_RETVAL_STRINGL((const char *) bson_get_data(&b), b.len);
1680
bson_destroy(&b);
1681
} else {
1682
- phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE TSRMLS_CC, "%s", error.message ? error.message : "Error parsing JSON");
+ phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE TSRMLS_CC, "%s", error.domain == BSON_ERROR_JSON ? error.message : "Error parsing JSON");
1683
}
1684
1685
/* }}} */
0 commit comments