xref: /PHP-7.2/ext/opcache/tests/bug76275.phpt (revision 75bc3446)
1--TEST--
2Bug #76275: Assertion failure in file cache when unserializing empty try_catch_array
3--INI--
4opcache.enabled=1
5opcache.enable_cli=1
6opcache.file_cache={TMP}
7--SKIPIF--
8<?php require_once('skipif.inc'); ?>
9--FILE--
10<?php
11
12if (PHP_VERSION_ID >= 70000) {
13    echo "Done";
14    return;
15}
16
17if (!is_callable('random_bytes')) {
18    try {
19    } catch (com_exception $e) {
20    }
21
22    function random_bytes($length)
23    {
24        throw new Exception(
25            'There is no suitable CSPRNG installed on your system'
26        );
27        return '';
28    }
29}
30--EXPECT--
31Done
32