This should be fixed, [mcrypt_create_iv docs](http://php.net/manual/en/function.mcrypt-create-iv.php) state that using srand() is no longer required when using MCRYPT_RAND. These lines should be removed.