xref: /PHP-7.1/ext/mcrypt/tests/bug49738.phpt (revision dadef203)
1--TEST--
2Bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes)
3--SKIPIF--
4<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
5--FILE--
6<?php
7   $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
8   mcrypt_generic_init($td, 'aaaaaaaa', 'aaaaaaaa');
9   mcrypt_generic_deinit($td);
10   echo mcrypt_generic($td, 'aaaaaaaa');
11?>
12--EXPECTF--
13Deprecated: Function mcrypt_module_open() is deprecated in %s%ebug49738.php on line 2
14
15Deprecated: Function mcrypt_generic_init() is deprecated in %s%ebug49738.php on line 3
16
17Deprecated: Function mcrypt_generic_deinit() is deprecated in %s%ebug49738.php on line 4
18
19Deprecated: Function mcrypt_generic() is deprecated in %s%ebug49738.php on line 5
20
21Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug49738.php on line 5
22