php-src/ext/mcrypt/tests/bug41252.phpt

14 lines
432 B
Plaintext
Raw Normal View History

2007-05-01 16:04:16 +00:00
--TEST--
Bug #41252 (Calling mcrypt_generic without first calling mcrypt_generic_init crashes)
--SKIPIF--
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--FILE--
<?php
2007-07-20 10:10:11 +00:00
$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
echo mcrypt_generic($td,'aaaaaaaa');
2007-05-01 16:04:16 +00:00
print "I'm alive!\n";
?>
--EXPECTF--
2007-07-19 14:35:45 +00:00
Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init() in %sbug41252.php on line 3
2007-05-01 16:04:16 +00:00
I'm alive!