From d943cbdfa2586ff0fdbcff87257a74f617ba0c1a Mon Sep 17 00:00:00 2001 From: Marq Roldan Date: Sat, 28 Aug 2021 22:53:07 +0800 Subject: [PATCH] Captcha not working on PHP 7.2.12 (Windows) (#223) 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 --- lib/Flux/Captcha.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Flux/Captcha.php b/lib/Flux/Captcha.php index 59d9bf08..e243f20a 100644 --- a/lib/Flux/Captcha.php +++ b/lib/Flux/Captcha.php @@ -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,