From 99a8e2dcbc993455de885b8a585542c52e0f7937 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 22 Sep 2019 16:57:13 +0300 Subject: Merge pull request #5837 from sapics/travis/fix-warning Fix deprecation warning on Travis --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 30630e224..4a1b33313 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "paragonie/random_compat": "Provides better randomness in PHP 5.x" }, "require-dev": { - "mikey179/vfsStream": "1.1.*", + "mikey179/vfsstream": "1.1.*", "phpunit/phpunit": "4.* || 5.*" } } -- cgit v1.2.3-24-g4f1b From 43f48dca37bd84b41ebbc076b9b3967970413e98 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 22 Sep 2019 17:03:17 +0300 Subject: Merge pull request #5834 from najdanovicivan/qb-count-having-fix Fix count_all_result if QB query contains HAVING clause --- system/database/DB_query_builder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index f35b9fd0a..b1b76e46b 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -1412,7 +1412,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $qb_cache_orderby = $this->qb_cache_orderby; $this->qb_orderby = $this->qb_cache_orderby = array(); - $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby) OR $this->qb_limit OR $this->qb_offset) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR ! empty($this->qb_cache_groupby) OR ! empty($this->qb_having) OR $this->qb_limit OR $this->qb_offset) ? $this->query($this->_count_string.$this->protect_identifiers('numrows')."\nFROM (\n".$this->_compile_select()."\n) CI_count_all_results") : $this->query($this->_compile_select($this->_count_string.$this->protect_identifiers('numrows'))); -- cgit v1.2.3-24-g4f1b From 9a4c3eeaa3d7f3273b991ecfbc1606f540edfbdd Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 22 Sep 2019 17:06:18 +0300 Subject: [ci skip] Add changelog for #5834 --- user_guide_src/source/changelog.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 401704efe..4d6624a34 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.1.12 Release Date: Not Released +Bug fixes for 3.1.12 +==================== + +- Fixed a bug (#5834) - :doc:`Query Builder ` method ``count_all_results()`` triggered an SQL error for queries with a ``HAVING`` clause. Version 3.1.11 ============== @@ -21,7 +25,7 @@ Release Date: Sep 19, 2019 - Updated the :doc:`Session ` and :doc:`Cache ` libraries' 'redis' driver to work with phpRedis 5. Bug fixes for 3.1.11 -==================== +-------------------- - Fixed a bug (#5681) - :doc:`Database Forge ` method ``modify_column()`` produced erroneous SQL for ``DEFAULT`` attribute changes under PostgreSQL, Firebird. - Fixed a bug (#5692) - :doc:`Database Forge ` didn't handle column nullability with the 'oci8', 'pdo/oci' drivers. -- cgit v1.2.3-24-g4f1b From c5befe65ff4c5d663d051ce405850d8f30afd137 Mon Sep 17 00:00:00 2001 From: sapics Date: Thu, 19 Sep 2019 09:03:08 +0900 Subject: Update Ubuntu from Precise to Trusty on Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2cb2c1fac..f9a6a8215 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: precise +dist: trusty php: - 5.3 -- cgit v1.2.3-24-g4f1b From 2feb476a1200fac160960da8b890d58c697c6ce1 Mon Sep 17 00:00:00 2001 From: sapics Date: Thu, 19 Sep 2019 09:09:02 +0900 Subject: Add PHP 7.4snapshot tests on Travis --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index f9a6a8215..3b5d70144 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4snapshot - master - hhvm @@ -34,6 +35,7 @@ script: php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 matrix: allow_failures: + - php: 7.4snapshot - php: hhvm - php: master exclude: @@ -49,6 +51,8 @@ matrix: env: DB=mysql - php: 7.3 env: DB=mysql + - php: 7.4snapshot + env: DB=mysql - php: master env: DB=mysql -- cgit v1.2.3-24-g4f1b From b56fb1e3fda258bcd8c73f7683488ee7a400ecc7 Mon Sep 17 00:00:00 2001 From: sapics Date: Thu, 19 Sep 2019 09:12:40 +0900 Subject: Replace hhvm to hhvm-3.30 on Travis Composer is not support hhvm any more, thus, composer cause error in hhvm-4.x. hhvm-3.30 is the last php support version as https://hhvm.com/blog/2018/12/17/hhvm-3.30.html --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b5d70144..74f6209f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ php: - 7.3 - 7.4snapshot - master - - hhvm + - hhvm-3.30 env: - DB=mysql @@ -36,12 +36,12 @@ script: php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 matrix: allow_failures: - php: 7.4snapshot - - php: hhvm - php: master + - 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 -- cgit v1.2.3-24-g4f1b From 7c08b046a3116565b07f3b2803b2aa798f978823 Mon Sep 17 00:00:00 2001 From: sapics Date: Thu, 19 Sep 2019 10:32:08 +0900 Subject: Replace master to nightly on Travis From the reference of the travis, nightly is the recommended one. https://docs.travis-ci.com/user/languages/php/ It also updates built version. `master`: version 8.0.0-dev (built: Feb 11 2019 07:59:12) `nightly`: version 8.0.0-dev (built: Sep 3 2019 09:50:37) --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 74f6209f9..8d4ab82e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ php: - 7.2 - 7.3 - 7.4snapshot - - master + - nightly - hhvm-3.30 env: @@ -36,7 +36,7 @@ script: php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 matrix: allow_failures: - php: 7.4snapshot - - php: master + - php: nightly - php: hhvm-3.30 exclude: - php: hhvm-3.30 @@ -53,7 +53,7 @@ matrix: env: DB=mysql - php: 7.4snapshot env: DB=mysql - - php: master + - php: nightly env: DB=mysql branches: -- cgit v1.2.3-24-g4f1b From 9e684156a0aa763033da69bffb475e95103151a3 Mon Sep 17 00:00:00 2001 From: sapics Date: Mon, 23 Sep 2019 02:43:06 +0900 Subject: Move php5.3 test on Precise distribution PHP5.3 is not supported on Trusty in travis. https://docs.travis-ci.com/user/reference/trusty#php-images --- .travis.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d4ab82e7..e5926224a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: php dist: trusty php: - - 5.3 - 5.4 - 5.5 - 5.6 @@ -38,6 +37,29 @@ matrix: - php: 7.4snapshot - php: nightly - php: hhvm-3.30 + include: + - php: 5.3 + dist: precise + env: DB=mysql + - php: 5.3 + dist: precise + env: DB=mysqli + - php: 5.3 + dist: precise + env: DB=pgsql + - php: 5.3 + dist: precise + env: DB=sqlite + - php: 5.3 + dist: precise + env: DB=pdo/mysql + - php: 5.3 + dist: precise + env: DB=pdo/pgsql + - php: 5.3 + dist: precise + env: DB=pdo/sqlite + exclude: - php: hhvm-3.30 env: DB=pgsql -- cgit v1.2.3-24-g4f1b From 74a87aef6545755c873308290d9605efe9a01c86 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 10:15:27 +0300 Subject: [ci skip] Fix #5840 --- system/libraries/Cache/drivers/Cache_redis.php | 27 +++++++++++++++++++++----- user_guide_src/source/changelog.rst | 1 + 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index bff96fbfb..b72fb896a 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -83,6 +83,13 @@ class CI_Cache_redis extends CI_Driver */ protected static $_delete_name; + /** + * sRem()/sRemove() method name depending on phpRedis version + * + * @var string + */ + protected static $_delete_name; + // ------------------------------------------------------------------------ /** @@ -104,9 +111,19 @@ class CI_Cache_redis extends CI_Driver return; } - isset(static::$_delete_name) OR static::$_delete_name = version_compare(phpversion('phpredis'), '5', '>=') - ? 'del' - : 'delete'; + if ( ! isset(static::$_delete_name, static::$_sRemove_name)) + { + if (version_compare(phpversion('phpredis'), '5', '>=')) + { + static::$_delete_name = 'del'; + static::$_sRemove_name = 'sRem'; + } + else + { + static::$_delete_name = 'delete'; + static::$_sRemove_name = 'sRemove'; + } + } $CI =& get_instance(); @@ -193,7 +210,7 @@ class CI_Cache_redis extends CI_Driver } else { - $this->_redis->sRemove('_ci_redis_serialized', $id); + $this->_redis->{static::$_sRemove_name}('_ci_redis_serialized', $id); } return $this->_redis->set($id, $data, $ttl); @@ -214,7 +231,7 @@ class CI_Cache_redis extends CI_Driver return FALSE; } - $this->_redis->sRemove('_ci_redis_serialized', $key); + $this->_redis->{static::$_sRemove_name}('_ci_redis_serialized', $key); return TRUE; } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 4d6624a34..cfe9289c4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Bug fixes for 3.1.12 ==================== - Fixed a bug (#5834) - :doc:`Query Builder ` method ``count_all_results()`` triggered an SQL error for queries with a ``HAVING`` clause. +- Fixed a bug (#5840) - :doc:`Cache Library ` 'redis' driver triggered an ``E_DEPRECATED`` warning about ``sRemove()`` with phpRedis 5. Version 3.1.11 ============== -- cgit v1.2.3-24-g4f1b From 736592a8c452c6b13adfa4d16ff5f9d7078bd3b0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 10:19:20 +0300 Subject: Merge pull request #5832 from gxgpet/develop Improve create_captcha()'s logging Conflicts resolved: system/helpers/captcha_helper.php --- system/helpers/captcha_helper.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 37ef04b24..5252d417c 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -94,10 +94,21 @@ if ( ! function_exists('create_captcha')) } } - if ($img_path === '' OR $img_url === '' - OR ! is_dir($img_path) OR ! is_really_writable($img_path) - OR ! extension_loaded('gd')) + if ( ! extension_loaded('gd')) { + log_message('error', 'create_captcha(): GD extension is not loaded.'); + return FALSE; + } + + 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; } -- cgit v1.2.3-24-g4f1b From e72258f1098a3bb55f38dcc44ec16ea66c1c16f9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 10:30:29 +0300 Subject: [ci skip] Add changelog entry for PR #5832 --- user_guide_src/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cfe9289c4..fe63c8bed 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -7,6 +7,10 @@ Version 3.1.12 Release Date: Not Released +- General Changes + + - Improved logging of error conditions in :doc:`CAPTCHA Helper ` function :php:func:`create_captcha()`. + Bug fixes for 3.1.12 ==================== -- cgit v1.2.3-24-g4f1b From 8bedae5600ab0c5bf0320afb8be2ecac3e74c23f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 10:33:07 +0300 Subject: [ci skip] Merge pull request #5851 from ossamamehmood/patch-1 Fix for #5711 and added two more models --- application/config/user_agents.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index c1581e5cd..ec8e3cffd 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -152,6 +152,10 @@ $mobiles = array( 'open web' => 'Open Web', 'openweb' => 'OpenWeb', 'meizu' => 'Meizu', + 'huawei' => 'Huawei', + 'xiaomi' => 'Xiaomi', + 'oppo' => 'Oppo', + 'vivo' => 'Vivo', // Operating Systems 'android' => 'Android', -- cgit v1.2.3-24-g4f1b From 521e967a310f1304fa70dcbcbc0aac7ad463e2c7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 10:35:18 +0300 Subject: [ci skip] Add upgrade instructions for user_agents.php --- user_guide_src/source/installation/upgrade_3112.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/user_guide_src/source/installation/upgrade_3112.rst b/user_guide_src/source/installation/upgrade_3112.rst index 9c849d878..1000010ab 100644 --- a/user_guide_src/source/installation/upgrade_3112.rst +++ b/user_guide_src/source/installation/upgrade_3112.rst @@ -12,3 +12,9 @@ Replace all files and directories in your *system/* directory. .. note:: If you have any custom developed files in these directories, please make copies of them first. + +Step 2: Replace config/user_agents.php +================================ + +This config file has received some updates. Please copy it to +*application/config/user_agents.php*. -- cgit v1.2.3-24-g4f1b From deae7d79db2b4f157df32356c6c3e8acde6de3fb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 10:37:45 +0300 Subject: Merge pull request #5842 from sapics/chore/fix-indent Fix indentation / clear whitespace --- application/views/welcome_message.php | 13 ++++++++++++- system/database/DB.php | 2 +- system/database/drivers/ibase/ibase_forge.php | 4 ++-- system/database/drivers/pdo/pdo_driver.php | 2 +- .../database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 4 ++-- system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php | 4 ++-- system/database/drivers/postgre/postgre_forge.php | 4 ++-- system/libraries/Cache/drivers/Cache_apc.php | 8 ++++---- system/libraries/Cache/drivers/Cache_dummy.php | 8 ++++---- system/libraries/Cache/drivers/Cache_wincache.php | 8 ++++---- system/libraries/Profiler.php | 12 ++++++------ tests/codeigniter/helpers/file_helper_test.php | 6 +++--- tests/mocks/autoloader.php | 4 ++-- tests/mocks/ci_testcase.php | 2 +- 14 files changed, 46 insertions(+), 35 deletions(-) diff --git a/application/views/welcome_message.php b/application/views/welcome_message.php index f5115630b..d79c049bf 100644 --- a/application/views/welcome_message.php +++ b/application/views/welcome_message.php @@ -22,6 +22,11 @@ defined('BASEPATH') OR exit('No direct script access allowed'); color: #003399; background-color: transparent; font-weight: normal; + text-decoration: none; + } + + a:hover { + color: #97310e; } h1 { @@ -47,6 +52,12 @@ defined('BASEPATH') OR exit('No direct script access allowed'); #body { margin: 0 15px 0 15px; + min-height: 96px; + } + + p { + margin: 0 0 10px; + padding:0; } p.footer { @@ -86,4 +97,4 @@ defined('BASEPATH') OR exit('No direct script access allowed'); - \ No newline at end of file + diff --git a/system/database/DB.php b/system/database/DB.php index 02e0e1d39..68ea22c43 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/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_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 1feaa158f..c20d0bc91 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_close = '
'; + $pre_close = ''; } $output .= '' @@ -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_close = '
'; + $pre_close = ''; } $output .= '' diff --git a/tests/codeigniter/helpers/file_helper_test.php b/tests/codeigniter/helpers/file_helper_test.php index c31817595..ad56beb28 100644 --- a/tests/codeigniter/helpers/file_helper_test.php +++ b/tests/codeigniter/helpers/file_helper_test.php @@ -132,8 +132,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) @@ -142,6 +142,6 @@ class File_helper_Test extends CI_TestCase { ->at($this->_test_dir); $this->assertTrue(write_file(vfsStream::url('write.txt'), $content)); - } + } } \ No newline at end of file diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php index 11825de2c..9360a2b34 100644 --- a/tests/mocks/autoloader.php +++ b/tests/mocks/autoloader.php @@ -48,10 +48,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 -- cgit v1.2.3-24-g4f1b From 5c419bb115950a7027d6100698ffa323583a93d0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 11:01:56 +0300 Subject: [ci skip] Fix #5847 --- user_guide_src/source/database/forge.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index 5af4f2248..c6cacb1b0 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -370,7 +370,7 @@ Class Reference .. php:method:: drop_column($table, $column_name) :param string $table: Table name - :param array $column_name: The column name to drop + :param string $column_name: The column name to drop :returns: TRUE on success, FALSE on failure :rtype: bool -- cgit v1.2.3-24-g4f1b From d180cadbfda28b3e4bfef9a0313f039a6eac211d Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 8 Oct 2019 11:15:59 +0300 Subject: [ci skip] Merge pull request #5849 from Lablnet/patch-1 Added Infinix manufacture in user_agents.php --- application/config/user_agents.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/config/user_agents.php b/application/config/user_agents.php index ec8e3cffd..c4429aac5 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -156,6 +156,7 @@ $mobiles = array( 'xiaomi' => 'Xiaomi', 'oppo' => 'Oppo', 'vivo' => 'Vivo', + 'infinix' => 'Infinix', // Operating Systems 'android' => 'Android', -- cgit v1.2.3-24-g4f1b From 374386e402288f868f4a9c2cff2b4f8786d026bd Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 10 Oct 2019 18:01:49 +0200 Subject: fix static field name field with name $_delete_name already defined, use $_sRemove_name --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index b72fb896a..0539e2cdf 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -88,7 +88,7 @@ class CI_Cache_redis extends CI_Driver * * @var string */ - protected static $_delete_name; + protected static $_sRemove_name; // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From 6fd8d3f5180700e9b288d2d8446b5e09413c6230 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 21 Oct 2019 11:18:12 +0300 Subject: [ci skip] Fix #5857 --- system/libraries/Session/drivers/Session_files_driver.php | 4 ++++ user_guide_src/source/changelog.rst | 1 + 2 files changed, 5 insertions(+) diff --git a/system/libraries/Session/drivers/Session_files_driver.php b/system/libraries/Session/drivers/Session_files_driver.php index 2899b7dec..d9966273b 100644 --- a/system/libraries/Session/drivers/Session_files_driver.php +++ b/system/libraries/Session/drivers/Session_files_driver.php @@ -196,6 +196,10 @@ class CI_Session_files_driver extends CI_Session_driver implements SessionHandle $this->_fingerprint = md5(''); return ''; } + + // Prevent possible data corruption + // See https://github.com/bcit-ci/CodeIgniter/issues/5857 + clearstatcache(TRUE, $this->_file_path.$session_id); } // We shouldn't need this, but apparently we do ... // See https://github.com/bcit-ci/CodeIgniter/issues/4039 diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index fe63c8bed..079794b29 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -16,6 +16,7 @@ Bug fixes for 3.1.12 - Fixed a bug (#5834) - :doc:`Query Builder ` method ``count_all_results()`` triggered an SQL error for queries with a ``HAVING`` clause. - Fixed a bug (#5840) - :doc:`Cache Library ` 'redis' driver triggered an ``E_DEPRECATED`` warning about ``sRemove()`` with phpRedis 5. +- Fixed a bug (#5857) - :doc:`Session ` data could be corrupted after a concurrent request write with the 'files' driver due to a filesize cache being incorrect. Version 3.1.11 ============== -- cgit v1.2.3-24-g4f1b From 9507ad02801fedfa511407a5017bb161dd880382 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Nov 2019 12:21:38 +0200 Subject: [ci skip] Merge pull request #5859 from indrakaw/gitattributes Exclude user_guide directory from composer installation by GitAttributes. This would allow Composer users to use --prefer-dist in order to avoid downloading the entire user guide --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 51fea4174..a4296d591 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,3 +20,6 @@ tests/travis/ export-ignore # User Guide Source Files user_guide_src + +# User Guide Compiled Files +user_guide export-ignore -- cgit v1.2.3-24-g4f1b From beebaccc0a06c22b4af06ec913e501c7e116c60e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Nov 2019 12:24:03 +0200 Subject: [ci skip] Merge pull request #5861 from nebkat/patch-1 cache: redis: Check version of redis not phpredis --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 0539e2cdf..f0a72ee3c 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -113,7 +113,7 @@ class CI_Cache_redis extends CI_Driver if ( ! isset(static::$_delete_name, static::$_sRemove_name)) { - if (version_compare(phpversion('phpredis'), '5', '>=')) + if (version_compare(phpversion('redis'), '5', '>=')) { static::$_delete_name = 'del'; static::$_sRemove_name = 'sRem'; -- cgit v1.2.3-24-g4f1b From 58a3b738d014df293bac1e31fc40a37e5050f9ec Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 1 Nov 2019 12:29:45 +0200 Subject: [ci skip] Add changelog entry for #5861 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 079794b29..1e4e35c44 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -17,6 +17,7 @@ Bug fixes for 3.1.12 - Fixed a bug (#5834) - :doc:`Query Builder ` method ``count_all_results()`` triggered an SQL error for queries with a ``HAVING`` clause. - Fixed a bug (#5840) - :doc:`Cache Library ` 'redis' driver triggered an ``E_DEPRECATED`` warning about ``sRemove()`` with phpRedis 5. - Fixed a bug (#5857) - :doc:`Session ` data could be corrupted after a concurrent request write with the 'files' driver due to a filesize cache being incorrect. +- Fixed a bug (#5861) - :doc:`Cache Library ` 'redis' driver would always use phpRedis 5 ``del()`` due to an incorrect version check. Version 3.1.11 ============== -- cgit v1.2.3-24-g4f1b From d44af37e883b373cac255b4881ad3eb040c85e86 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Nov 2019 11:41:53 +0200 Subject: [ci skip] Merge pull request #5856 from ytetsuro/fix/oracle12.1-support-auto-increment Enhancement oracle dbforge, auto_increment can be used when using oracle 12.1. --- system/database/drivers/oci8/oci8_forge.php | 24 +++++++++++++++++++- .../drivers/pdo/subdrivers/pdo_oci_driver.php | 4 ++-- .../drivers/pdo/subdrivers/pdo_oci_forge.php | 26 +++++++++++++++++++++- 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php index 58f3c3913..a73899888 100644 --- a/system/database/drivers/oci8/oci8_forge.php +++ b/system/database/drivers/oci8/oci8_forge.php @@ -159,7 +159,29 @@ class CI_DB_oci8_forge extends CI_DB_forge { */ protected function _attr_auto_increment(&$attributes, &$field) { - // Not supported - sequences and triggers must be used instead + if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'number') !== FALSE && version_compare($this->db->version(), '12.1', '>=')) + { + $field['auto_increment'] = ' GENERATED ALWAYS AS IDENTITY'; + } + } + + // -------------------------------------------------------------------- + + /** + * Process column + * + * @param array $field + * @return string + */ + protected function _process_column($field) + { + return $this->db->escape_identifiers($field['name']) + .' '.$field['type'].$field['length'] + .$field['unsigned'] + .$field['default'] + .$field['auto_increment'] + .$field['null'] + .$field['unique']; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php index dba49585c..41f7a6485 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php @@ -142,9 +142,9 @@ class CI_DB_pdo_oci_driver extends CI_DB_pdo_driver { } $version_string = parent::version(); - if (preg_match('#Release\s(?\d+(?:\.\d+)+)#', $version_string, $match)) + if (preg_match('#(Release\s)?(?\d+(?:\.\d+)+)#', $version_string, $match)) { - return $this->data_cache['version'] = $match[1]; + return $this->data_cache['version'] = $match['version']; } return FALSE; diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php index b5d3eb143..aa78461df 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php @@ -150,9 +150,33 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge { */ protected function _attr_auto_increment(&$attributes, &$field) { - // Not supported - sequences and triggers must be used instead + if ( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE && stripos($field['type'], 'number') !== FALSE && version_compare($this->db->version(), '12.1', '>=')) + { + $field['auto_increment'] = ' GENERATED ALWAYS AS IDENTITY'; + } + } + + // -------------------------------------------------------------------- + + /** + * Process column + * + * @param array $field + * @return string + */ + protected function _process_column($field) + { + return $this->db->escape_identifiers($field['name']) + .' '.$field['type'].$field['length'] + .$field['unsigned'] + .$field['default'] + .$field['auto_increment'] + .$field['null'] + .$field['unique']; } + // -------------------------------------------------------------------- + /** * Field attribute TYPE * -- cgit v1.2.3-24-g4f1b From 7911ed0bd42f1fa0ec985faf53eb7db7b7bc7c1b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 25 Nov 2019 11:45:16 +0200 Subject: [ci skip] Add changelog entry for PR #5856 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 1e4e35c44..7c95fc710 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -10,6 +10,7 @@ Release Date: Not Released - General Changes - Improved logging of error conditions in :doc:`CAPTCHA Helper ` function :php:func:`create_captcha()`. + - Added ``AUTO_INCREMENT`` support for Oracle 12.1+ to :doc:`Database Forge `. Bug fixes for 3.1.12 ==================== -- cgit v1.2.3-24-g4f1b From 748b2280c63e994f4153bdafb683606df8213bc3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 27 Jan 2020 19:26:03 +0200 Subject: [ci skip] Fix #5879 --- system/libraries/Profiler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index d7a171f26..e3c4bd10a 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -105,7 +105,7 @@ class CI_Profiler { { if ( ! isset($config[$section])) { - $this->_compile_{$section} = TRUE; + $this->{'_compile_'.$section} = TRUE; } } @@ -135,7 +135,7 @@ class CI_Profiler { { if (in_array($method, $this->_available_sections)) { - $this->_compile_{$method} = ($enable !== FALSE); + $this->{'_compile_'.$method} = ($enable !== FALSE); } } } @@ -554,7 +554,7 @@ class CI_Profiler { foreach ($this->_available_sections as $section) { - if ($this->_compile_{$section} !== FALSE) + if ($this->{'_compile_'.$section} !== FALSE) { $func = '_compile_'.$section; $output .= $this->{$func}(); -- cgit v1.2.3-24-g4f1b From 75a599c50990a124c5bc846399396a858a8a0830 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 27 Jan 2020 19:28:25 +0200 Subject: [ci skip] Add changelog entry for issue #5879 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 7c95fc710..2f0bd4f5c 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -19,6 +19,7 @@ Bug fixes for 3.1.12 - Fixed a bug (#5840) - :doc:`Cache Library ` 'redis' driver triggered an ``E_DEPRECATED`` warning about ``sRemove()`` with phpRedis 5. - Fixed a bug (#5857) - :doc:`Session ` data could be corrupted after a concurrent request write with the 'files' driver due to a filesize cache being incorrect. - Fixed a bug (#5861) - :doc:`Cache Library ` 'redis' driver would always use phpRedis 5 ``del()`` due to an incorrect version check. +- Fixed a bug (#5879) - :doc:`Profiler Library ` triggered an ``E_DEPRECATED`` warning on PHP 7.4+. Version 3.1.11 ============== -- cgit v1.2.3-24-g4f1b From 4d02ba7028608dfad42db7c56a047196c0ff2b17 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 27 Jan 2020 19:30:35 +0200 Subject: [ci skip] Merge pull request #5885 from etrianag/develop Update documentation for method parse_string --- user_guide_src/source/libraries/parser.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/parser.rst b/user_guide_src/source/libraries/parser.rst index 6c9d28959..0b0d41740 100644 --- a/user_guide_src/source/libraries/parser.rst +++ b/user_guide_src/source/libraries/parser.rst @@ -290,7 +290,7 @@ Class Reference .. php:method:: parse_string($template, $data[, $return = FALSE]) - :param string $template: Path to view file + :param string $template: Content to parse :param array $data: Variable data :param bool $return: Whether to only return the parsed template :returns: Parsed template string @@ -306,4 +306,4 @@ Class Reference :rtype: void Sets the delimiters (opening and closing) for a - pseudo-variable "tag" in a template. \ No newline at end of file + pseudo-variable "tag" in a template. -- cgit v1.2.3-24-g4f1b From c4de896905b995eb9a82dab7de15451d8624bc49 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 27 Jan 2020 19:32:24 +0200 Subject: [ci skip] Merge pull request #5881 from InSitu-Software/query_builder_full_join Added FULL OUTER JOIN to QueryBuilder --- system/database/DB_query_builder.php | 2 +- user_guide_src/source/database/query_builder.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index b1b76e46b..6f64c62ae 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -529,7 +529,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { { $type = strtoupper(trim($type)); - if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE)) + if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER', 'FULL OUTER', 'FULL'), TRUE)) { $type = ''; } diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 3c72218cd..83721c8b5 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -199,7 +199,7 @@ query. If you need a specific type of JOIN you can specify it via the third parameter of the function. Options are: left, right, outer, inner, left -outer, and right outer. +outer, right outer and full outer. :: -- cgit v1.2.3-24-g4f1b From b3c3bff136bd7db1e96dffa2a6ec7d03b4b8c7a5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 27 Jan 2020 19:36:17 +0200 Subject: [ci skip] Add changelog entry for PR #5881 --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 2f0bd4f5c..fc5cb7067 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Release Date: Not Released - Improved logging of error conditions in :doc:`CAPTCHA Helper ` function :php:func:`create_captcha()`. - Added ``AUTO_INCREMENT`` support for Oracle 12.1+ to :doc:`Database Forge `. + - Added ``FULL [OUTER] JOIN`` support to :doc:`Query Builder `. Bug fixes for 3.1.12 ==================== -- cgit v1.2.3-24-g4f1b From 797cd3d25a5411bef7eea9d3b8c38c567bc4635b Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Mon, 27 Jan 2020 15:38:50 -0600 Subject: Merge pull request #5893 from aitorres/develop ZIP Library Memory Optimization --- system/libraries/Zip.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index c0a14023d..44f73aead 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -406,13 +406,13 @@ class CI_Zip { return FALSE; } - return $this->zipdata - .$this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00" + $footer = $this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00" .pack('v', $this->entries) // total # of entries "on this disk" .pack('v', $this->entries) // total # of entries overall .pack('V', self::strlen($this->directory)) // size of central dir .pack('V', self::strlen($this->zipdata)) // offset to start of central dir ."\x00\x00"; // .zip file comment length + return $this->zipdata . $footer; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From ced499f7ad90ff8bb6bf0faa2e24a1593204de9a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Jan 2020 21:13:04 +0200 Subject: [ci skip] Add comment about PR #5893 changes --- system/libraries/Zip.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index 44f73aead..52fac2f8a 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -406,13 +406,14 @@ class CI_Zip { return FALSE; } + // @see https://github.com/bcit-ci/CodeIgniter/issues/5864 $footer = $this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00" .pack('v', $this->entries) // total # of entries "on this disk" .pack('v', $this->entries) // total # of entries overall .pack('V', self::strlen($this->directory)) // size of central dir .pack('V', self::strlen($this->zipdata)) // offset to start of central dir ."\x00\x00"; // .zip file comment length - return $this->zipdata . $footer; + return $this->zipdata.$footer; } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b