diff options
-rw-r--r-- | .travis.yml | 20 | ||||
-rw-r--r-- | application/config/user_agents.php | 4 | ||||
-rw-r--r-- | system/helpers/captcha_helper.php | 10 |
3 files changed, 25 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml index 963d2cd2f..8525d5f6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: precise +dist: trusty php: - 5.4 @@ -9,8 +9,9 @@ php: - 7.1 - 7.2 - 7.3 - - master - - hhvm + - 7.4snapshot + - nightly + - hhvm-3.30 env: - DB=mysql @@ -33,12 +34,13 @@ script: php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 matrix: allow_failures: - - php: hhvm - - php: master + - php: 7.4snapshot + - php: nightly + - php: hhvm-3.30 exclude: - - php: hhvm + - php: hhvm-3.30 env: DB=pgsql - - php: hhvm + - php: hhvm-3.30 env: DB=pdo/pgsql - php: 7.0 env: DB=mysql @@ -48,7 +50,9 @@ matrix: env: DB=mysql - php: 7.3 env: DB=mysql - - php: master + - php: 7.4snapshot + env: DB=mysql + - php: nightly env: DB=mysql branches: diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 3523528bf..48d5ab526 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -153,6 +153,10 @@ $mobiles = array( 'open web' => 'Open Web', 'openweb' => 'OpenWeb', 'meizu' => 'Meizu', + 'huawei' => 'Huawei', + 'xiaomi' => 'Xiaomi', + 'oppo' => 'Oppo', + 'vivo' => 'Vivo', // Operating Systems 'android' => 'Android', diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 94365adb5..642ff3a50 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -99,13 +99,21 @@ if ( ! function_exists('create_captcha')) if ( ! extension_loaded('gd')) { + log_message('error', 'create_captcha(): GD extension is not loaded.'); return FALSE; } if ($img_url !== '' OR $img_path !== '') { - if ($img_path === '' OR $img_url === '' OR ! is_dir($img_path) OR ! is_really_writable($img_path)) + if ($img_path === '' OR $img_url === '') { + log_message('error', 'create_captcha(): $img_path and $img_url are required.'); + return FALSE; + } + + if ( ! is_dir($img_path) OR ! is_really_writable($img_path)) + { + log_message('error', "create_captcha(): '{$img_path}' is not a dir, nor is it writable."); return FALSE; } |