summaryrefslogtreecommitdiff
path: root/ext/intl/tests/bug60192-sort.phpt
blob: 8489a6db7da395e4dcb2b4145213dc6d5d3980f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Bug #60192 (SegFault when Collator not constructed properly)
--SKIPIF--
<?php
    if (!extension_loaded('intl')) { die('skip intl extension not available'); }
?>
--FILE--
<?php

class Collator2 extends Collator{
    public function __construct() {
        // omitting parent::__construct($someLocale);
    }
}

$c = new Collator2();
$a = array('a', 'b');
$c->sort($a);
?>
--EXPECTF--
Fatal error: Uncaught Error: Object not initialized in %s:%d
Stack trace:
#0 %s(%d): Collator->sort(Array)
#1 {main}
  thrown in %s on line %d