summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2019-10-08 10:15:25 +0200
committerGitHub <noreply@github.com>2019-10-08 10:15:25 +0200
commitb92da898b46acde1181347941d0a7413d19ad88e (patch)
treed5724d321ebf1c319d0d745939a2833ad695994d
parent2229e5c96174171d9eec0d595e7693b987374e95 (diff)
parent6f21b77955e5089bc07881adb209d2c23d9ba461 (diff)
Merge branch 'develop' into patch-1
-rw-r--r--.travis.yml20
-rw-r--r--application/config/user_agents.php4
-rw-r--r--application/views/welcome_message.php6
-rw-r--r--system/database/DB.php2
-rw-r--r--system/database/drivers/ibase/ibase_forge.php4
-rw-r--r--system/database/drivers/pdo/pdo_driver.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php4
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php4
-rw-r--r--system/database/drivers/postgre/postgre_forge.php4
-rw-r--r--system/helpers/captcha_helper.php10
-rw-r--r--system/libraries/Cache/drivers/Cache_apc.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_apcu.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_dummy.php8
-rw-r--r--system/libraries/Cache/drivers/Cache_wincache.php8
-rw-r--r--system/libraries/Profiler.php12
-rw-r--r--tests/codeigniter/helpers/file_helper_test.php6
-rw-r--r--tests/mocks/autoloader.php4
-rw-r--r--tests/mocks/ci_testcase.php2
18 files changed, 66 insertions, 50 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 1a1111be8..c866903f6 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',
'infinix' => 'Infinix',
// Operating Systems
diff --git a/application/views/welcome_message.php b/application/views/welcome_message.php
index bc5b441a9..dae768bc8 100644
--- a/application/views/welcome_message.php
+++ b/application/views/welcome_message.php
@@ -27,7 +27,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
a:hover {
- color: #97310e;
+ color: #97310e;
}
h1 {
@@ -69,8 +69,8 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
p {
- margin: 0 0 10px;
- padding:0;
+ margin: 0 0 10px;
+ padding:0;
}
p.footer {
diff --git a/system/database/DB.php b/system/database/DB.php
index dddcf758c..558212718 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -185,7 +185,7 @@ function &DB($params = '', $query_builder_override = NULL)
elseif ( ! class_exists('CI_DB', FALSE))
{
/**
- * @ignore
+ * @ignore
*/
class CI_DB extends CI_DB_driver { }
}
diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php
index 29a3acf69..ad3382042 100644
--- a/system/database/drivers/ibase/ibase_forge.php
+++ b/system/database/drivers/ibase/ibase_forge.php
@@ -140,7 +140,7 @@ class CI_DB_ibase_forge extends CI_DB_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -183,7 +183,7 @@ class CI_DB_ibase_forge extends CI_DB_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index c5d120fd3..614d35096 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -302,7 +302,7 @@ class CI_DB_pdo_driver extends CI_DB {
$error['code'] = isset($pdo_error[1]) ? $pdo_error[0].'/'.$pdo_error[1] : $pdo_error[0];
if (isset($pdo_error[2]))
{
- $error['message'] = $pdo_error[2];
+ $error['message'] = $pdo_error[2];
}
return $error;
diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
index eceb59796..db7936631 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php
@@ -126,7 +126,7 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -169,7 +169,7 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
index a4ccff407..4e19e9c57 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php
@@ -106,7 +106,7 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -154,7 +154,7 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index 481e222b8..a378d146b 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -101,7 +101,7 @@ class CI_DB_postgre_forge extends CI_DB_forge {
* @return string|string[]
*/
protected function _alter_table($alter_type, $table, $field)
- {
+ {
if (in_array($alter_type, array('DROP', 'ADD'), TRUE))
{
return parent::_alter_table($alter_type, $table, $field);
@@ -149,7 +149,7 @@ class CI_DB_postgre_forge extends CI_DB_forge {
}
return $sqls;
- }
+ }
// --------------------------------------------------------------------
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;
}
diff --git a/system/libraries/Cache/drivers/Cache_apc.php b/system/libraries/Cache/drivers/Cache_apc.php
index 8da8854ee..c0527e665 100644
--- a/system/libraries/Cache/drivers/Cache_apc.php
+++ b/system/libraries/Cache/drivers/Cache_apc.php
@@ -160,10 +160,10 @@ class CI_Cache_apc extends CI_Driver {
* @param string user/filehits
* @return mixed array on success, false on failure
*/
- public function cache_info($type = NULL)
- {
- return apc_cache_info($type);
- }
+ public function cache_info($type = NULL)
+ {
+ return apc_cache_info($type);
+ }
// ------------------------------------------------------------------------
diff --git a/system/libraries/Cache/drivers/Cache_apcu.php b/system/libraries/Cache/drivers/Cache_apcu.php
index 0d84f8ee3..01f80e79b 100644
--- a/system/libraries/Cache/drivers/Cache_apcu.php
+++ b/system/libraries/Cache/drivers/Cache_apcu.php
@@ -171,10 +171,10 @@ class CI_Cache_apcu extends CI_Driver {
*
* @return mixed array on success, false on failure
*/
- public function cache_info()
- {
- return apcu_cache_info();
- }
+ public function cache_info()
+ {
+ return apcu_cache_info();
+ }
// ------------------------------------------------------------------------
diff --git a/system/libraries/Cache/drivers/Cache_dummy.php b/system/libraries/Cache/drivers/Cache_dummy.php
index fdb9042ef..0a90d0692 100644
--- a/system/libraries/Cache/drivers/Cache_dummy.php
+++ b/system/libraries/Cache/drivers/Cache_dummy.php
@@ -138,10 +138,10 @@ class CI_Cache_dummy extends CI_Driver {
* @param string user/filehits
* @return bool FALSE
*/
- public function cache_info($type = NULL)
- {
- return FALSE;
- }
+ public function cache_info($type = NULL)
+ {
+ return FALSE;
+ }
// ------------------------------------------------------------------------
diff --git a/system/libraries/Cache/drivers/Cache_wincache.php b/system/libraries/Cache/drivers/Cache_wincache.php
index e19c6ca99..703fece7a 100644
--- a/system/libraries/Cache/drivers/Cache_wincache.php
+++ b/system/libraries/Cache/drivers/Cache_wincache.php
@@ -169,10 +169,10 @@ class CI_Cache_wincache extends CI_Driver {
*
* @return mixed array on success, false on failure
*/
- public function cache_info()
- {
- return wincache_ucache_info(TRUE);
- }
+ public function cache_info()
+ {
+ return wincache_ucache_info(TRUE);
+ }
// ------------------------------------------------------------------------
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index 77af7b99b..d7a171f26 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -486,13 +486,13 @@ class CI_Profiler {
{
$pre = '';
$pre_close = '';
-
+
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
-
+
$pre = '<pre>' ;
- $pre_close = '</pre>';
+ $pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
@@ -524,13 +524,13 @@ class CI_Profiler {
{
$pre = '';
$pre_close = '';
-
+
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
-
+
$pre = '<pre>' ;
- $pre_close = '</pre>';
+ $pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
diff --git a/tests/codeigniter/helpers/file_helper_test.php b/tests/codeigniter/helpers/file_helper_test.php
index 5ed8cb5c0..dd74ee46b 100644
--- a/tests/codeigniter/helpers/file_helper_test.php
+++ b/tests/codeigniter/helpers/file_helper_test.php
@@ -119,8 +119,8 @@ class File_helper_Test extends CI_TestCase {
// --------------------------------------------------------------------
- public function test_write_file()
- {
+ public function test_write_file()
+ {
$content = 'Jack and Jill went up the mountain to fight a billy goat.';
$file = vfsStream::newFile('write.txt', 0777)
@@ -129,6 +129,6 @@ class File_helper_Test extends CI_TestCase {
->at($this->_test_dir);
$this->assertTrue(write_file(vfsStream::url('write.txt'), $content));
- }
+ }
}
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php
index a912327ca..4dd53d4af 100644
--- a/tests/mocks/autoloader.php
+++ b/tests/mocks/autoloader.php
@@ -47,10 +47,10 @@ function autoload($class)
'Profiler',
'Table',
'Trackback',
- 'Typography',
+ 'Typography',
'Unit_test',
'Upload',
- 'User_agent',
+ 'User_agent',
'Xmlrpc',
'Zip'
);
diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php
index 4f478fb4e..8dc4682ef 100644
--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -241,7 +241,7 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
$dir_root = $root->getChild($dir);
if ($dir_root)
{
- // Yes - recurse into subdir
+ // Yes - recurse into subdir
$root = $dir_root;
}
else