xref: /PHP-7.4/ext/intl/tests/bug60192-sort.phpt (revision d679f022)
1--TEST--
2Bug #60192 (SegFault when Collator not constructed properly)
3--SKIPIF--
4<?php
5	if (!extension_loaded('intl')) { die('skip intl extension not available'); }
6?>
7--FILE--
8<?php
9
10class Collator2 extends Collator{
11	public function __construct() {
12		// omitting parent::__construct($someLocale);
13	}
14}
15
16$c = new Collator2();
17$a = array('a', 'b');
18$c->sort($a);
19--EXPECTF--
20Fatal error: Uncaught Error: Object not initialized in %s:%d
21Stack trace:
22#0 %s(%d): Collator->sort(Array)
23#1 {main}
24  thrown in %s on line %d
25