mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
Fixed bug #80644: ResourceBundle::get() doesn't reset error state
This commit is contained in:
parent
1bdd8f7ae4
commit
05d168013a
4
NEWS
4
NEWS
@ -33,6 +33,10 @@ PHP NEWS
|
||||
. Fixed bug #80560 (Strings containing only a base prefix return 0 object).
|
||||
(girgias)
|
||||
|
||||
- Intl:
|
||||
. Fixed bug #80644 (Missing resource causes subsequent get() calls to fail).
|
||||
(Nikita)
|
||||
|
||||
- MySQLi:
|
||||
. Fixed bug #67983 (mysqlnd with MYSQLI_OPT_INT_AND_FLOAT_NATIVE fails to
|
||||
interpret bit columns). (Nikita)
|
||||
|
@ -171,8 +171,9 @@ static void resourcebundle_array_fetch(zend_object *object, zval *offset, zval *
|
||||
char *pbuf;
|
||||
ResourceBundle_object *rb;
|
||||
|
||||
intl_error_reset( NULL );
|
||||
rb = php_intl_resourcebundle_fetch_object(object);
|
||||
intl_error_reset(NULL);
|
||||
intl_error_reset(INTL_DATA_ERROR_P(rb));
|
||||
|
||||
if(Z_TYPE_P(offset) == IS_LONG) {
|
||||
is_numeric = 1;
|
||||
|
@ -28,6 +28,10 @@ function ut_main() {
|
||||
$t = ut_resourcebundle_get( $r, 'nonexisting' );
|
||||
$str_res .= debug( $t );
|
||||
|
||||
// Make sure accessing existing after non-existing works.
|
||||
$t = ut_resourcebundle_get( $r, 'teststring' );
|
||||
$str_res .= debug( $t );
|
||||
|
||||
return $str_res;
|
||||
}
|
||||
include_once( 'ut_common.inc' );
|
||||
@ -55,3 +59,5 @@ testtable: 3
|
||||
testarray: string 3
|
||||
NULL
|
||||
2: Cannot load resource element 'nonexisting': U_MISSING_RESOURCE_ERROR
|
||||
Hello World!
|
||||
0: U_ZERO_ERROR
|
||||
|
Loading…
Reference in New Issue
Block a user