Skip to content

Commit 6b0a809

Browse files
committed
ext/intl: Fix return value on failure for resourcebundle count handler
Closes GH-19277
1 parent 83b8d2c commit 6b0a809

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ PHP NEWS
2020
- Intl:
2121
. Fixed GH-19261: msgfmt_parse_message leaks on message creation failure.
2222
(David Carlier)
23+
. Fix return value on failure for resourcebundle count handler. (Girgias)
2324

2425
- LDAP:
2526
. Fixed bug GH-18529 (additional inheriting of TLS int options).

ext/intl/resourcebundle/resourcebundle_class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static zend_result resourcebundle_array_count(zend_object *object, zend_long *co
257257
if (rb->me == NULL) {
258258
intl_errors_set(&rb->error, U_ILLEGAL_ARGUMENT_ERROR,
259259
"Found unconstructed ResourceBundle", 0);
260-
return 0;
260+
return FAILURE;
261261
}
262262

263263
*count = ures_getSize( rb->me );

0 commit comments

Comments
 (0)