PHP :: Bug #76556 :: get_debug_info handler for BreakIterator shows wrong type
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76556 get_debug_info handler for BreakIterator shows wrong type
Submitted: 2018-06-30 17:16 UTC Modified: 2018-06-30 17:16 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: intl (PECL)
PHP Version: 7.1Git-2018-06-30 (Git) OS: *
Private report: No CVE-ID: None
 [2018-06-30 17:16 UTC] cmb@php.net
Description:
------------
The get_debug_info handler for BreakIterator shows the text as
type instead of the proper type, and leaks memory.

Test script:
---------------
<?php

$it = IntlBreakIterator::createCharacterInstance();
$it->setText('foo');
var_dump($it);


Expected result:
----------------
object(IntlRuleBasedBreakIterator)#1 (3) {
  ["valid"]=>
  bool(true)
  ["text"]=>
  string(3) "foo"
  ["type"]=>
  string(33) "N6icu_5722RuleBasedBreakIteratorE"
}


Actual result:
--------------
object(IntlRuleBasedBreakIterator)#1 (3) {
  ["valid"]=>
  bool(true)
  ["text"]=>
  string(3) "foo"
  ["type"]=>
  string(3) "foo"
}
[Sat Jun 30 17:06:19 2018]  Script:  '…'
/parent/php-src/Zend/zend_string.h(122) :  Freeing 0x00007f04f4259300 (64 bytes), script=…
=== Total 1 memory leaks detected ===

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-30 17:16 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2018-06-30 21:24 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1118fca75dca112e7a6aa60296626733ccfc4284
Log: Fix #76556: get_debug_info handler for BreakIterator shows wrong type
 [2018-06-30 21:24 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Aug 16 12:01:24 2018 UTC