Skip to content

Commit 3e4697b

Browse files
committed
PHPC-1000: Add missing exception
1 parent 4905b1e commit 3e4697b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/phongo_bson_encode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ static inline bool phongo_check_bson_serialize_return_type(zval* retval, zend_cl
130130
return true;
131131
}
132132

133+
phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE,
134+
"Expected to receive instance of %s, %s given",
135+
ZSTR_VAL(php_phongo_serializable_ce->name),
136+
ZSTR_VAL(ce->name));
133137
return false;
134138
}
135139

0 commit comments

Comments
 (0)