If any other file is introduced into the /manager/includes/ttf folder (e.g. a lock file introduced by Dreamweaver) it causes the Captcha to randomly fail, as the random font file chosen does not check it is a .ttf file before using it.
Solution - add a basic check that the font file being used has a .ttf extension
Replace line 114:
if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file)) {
with:
if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file) && substr($file, -4) == '.ttf') {