xref: /PHP-7.0/ext/mcrypt/tests/bug49738.phpt (revision 0f57b15e)
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--
13Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug49738.php on line 5
14