mirror of
https://github.com/php/php-src.git
synced 2024-10-02 07:16:11 +00:00
07c0d714a5
Constructor of IntlDateFormatter would leak if called twice. Made calling it more than once error out before starting using resources.
15 lines
412 B
PHP
15 lines
412 B
PHP
--TEST--
|
|
Bug #62081: IntlDateFormatter leaks memory if called twice
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('intl'))
|
|
die('skip intl extension not enabled');
|
|
--FILE--
|
|
<?php
|
|
ini_set('intl.error_level', E_WARNING);
|
|
$x = new IntlDateFormatter(1,1,1,1,1);
|
|
var_dump($x->__construct(1,1,1,1,1));
|
|
--EXPECTF--
|
|
Warning: IntlDateFormatter::__construct(): datefmt_create: cannot call constructor twice in %s on line %d
|
|
NULL
|