Skip to content

Commit

Permalink
Captcha not working on PHP 7.2.12 (Windows) (#223)
Browse files Browse the repository at this point in the history
Added realpath() to find the font
Tested on Windows (PHP 5.4.16 and 7.2.12) and on Ubuntu 18.04 (7.2.12)

Co-authored-by: Hyvraine <numb3rs0125@gmail.com>
  • Loading branch information
marqroldan and kenshn111 committed Aug 28, 2021
1 parent 81b895e commit d943cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Flux/Captcha.php
Expand Up @@ -37,7 +37,7 @@ public function __construct($options = array())
'chars' => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWWXYZ0123456789',
'length' => 5,
'background' => FLUX_DATA_DIR.'/captcha/background.png',
'fontPath' => FLUX_DATA_DIR.'/captcha/fonts',
'fontPath' => realpath(FLUX_DATA_DIR.'/captcha/fonts'),
'fontName' => 'default.ttf',
'fontSize' => 28,
'yPosition' => 40,
Expand Down

0 comments on commit d943cbd

Please sign in to comment.