xref: /PHP-5.5/ext/mcrypt/tests/bug41252.phpt (revision 3657b0ab)
1--TEST--
2Bug #41252 (Calling mcrypt_generic without first calling mcrypt_generic_init 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, '');
8echo mcrypt_generic($td,'aaaaaaaa');
9print "I'm alive!\n";
10?>
11--EXPECTF--
12Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug41252.php on line 3
13I'm alive!
14