mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.2'
* PHP-7.2: Fix #76556: get_debug_info handler for BreakIterator shows wrong type
This commit is contained in:
commit
1b61c3b210
3 changed files with 28 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -21,6 +21,10 @@ PHP NEWS
|
|||
. Fixed bug #73342 (Vulnerability in php-fpm by changing stdin to
|
||||
non-blocking). (Nikita)
|
||||
|
||||
- intl:
|
||||
. Fixed bug #76556 (get_debug_info handler for BreakIterator shows wrong
|
||||
type). (cmb)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #76532 (Integer overflow and excessive memory usage
|
||||
in mb_strimwidth). (MarcusSchwarz)
|
||||
|
|
|
@ -167,7 +167,7 @@ static HashTable *BreakIterator_get_debug_info(zval *object, int *is_temp)
|
|||
}
|
||||
|
||||
ZVAL_STRING(&val, const_cast<char*>(typeid(*biter).name()));
|
||||
zend_hash_str_update(debug_info, "type", sizeof("type") - 1, &bio->text);
|
||||
zend_hash_str_update(debug_info, "type", sizeof("type") - 1, &val);
|
||||
|
||||
return debug_info;
|
||||
}
|
||||
|
|
23
ext/intl/tests/bug76556.phpt
Normal file
23
ext/intl/tests/bug76556.phpt
Normal file
|
@ -0,0 +1,23 @@
|
|||
--TEST--
|
||||
Bug #76556 (get_debug_info handler for BreakIterator shows wrong type)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('intl')) die('skip intl extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$it = IntlBreakIterator::createCharacterInstance();
|
||||
$it->setText('foo');
|
||||
var_dump($it);
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
object(IntlRuleBasedBreakIterator)#%d (3) {
|
||||
["valid"]=>
|
||||
bool(true)
|
||||
["text"]=>
|
||||
string(3) "foo"
|
||||
["type"]=>
|
||||
string(%d) "%sRuleBasedBreakIterator%s"
|
||||
}
|
||||
===DONE===
|
Loading…
Add table
Add a link
Reference in a new issue