Skip to content

Commit 52eae8b

Browse files
committed
Improve comments on zend_call_method() failures
1 parent ecbab6d commit 52eae8b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bson.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,8 @@ void object_to_bson(zval *object, php_phongo_bson_flags_t flags, const char *key
10271027
#endif
10281028

10291029
if (Z_ISUNDEF(obj_data)) {
1030-
/* zend_call_method() failed */
1030+
/* zend_call_method() failed or bsonSerialize() threw an
1031+
* exception. Either way, there is nothing else to do. */
10311032
return;
10321033
}
10331034

@@ -1295,7 +1296,8 @@ void phongo_zval_to_bson(zval *data, php_phongo_bson_flags_t flags, bson_t *bson
12951296
#endif
12961297

12971298
if (Z_ISUNDEF(obj_data)) {
1298-
/* zend_call_method() failed */
1299+
/* zend_call_method() failed or bsonSerialize() threw an
1300+
* exception. Either way, there is nothing else to do. */
12991301
return;
13001302
}
13011303

0 commit comments

Comments
 (0)