From b01047570608a976d4721147bbb8710ffd674551 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 19 Jul 2016 14:36:20 +0300 Subject: Fix #4695 --- system/libraries/User_agent.php | 6 ++---- user_guide_src/source/changelog.rst | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index c4e11592d..60d159966 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -173,13 +173,11 @@ class CI_User_agent { */ public function __construct() { + $this->_load_agent_file(); + if (isset($_SERVER['HTTP_USER_AGENT'])) { $this->agent = trim($_SERVER['HTTP_USER_AGENT']); - } - - if ($this->agent !== NULL && $this->_load_agent_file()) - { $this->_compile_data(); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index a9cb450c8..ed6446bb4 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -41,6 +41,7 @@ Bug fixes for 3.0.7 - Fixed a bug (#4678) - :doc:`Database Forge ` tried to use unsupported ``IF NOT EXISTS`` clause when creating tables on Oracle. - Fixed a bug (#4691) - :doc:`File Uploading Library ` method ``data()`` returns wrong 'raw_name' when the filename extension is also contained in the raw filename. - Fixed a bug (#4679) - :doc:`Input Library ` method ``ip_address()`` errors with a matching ``$config['proxy_ips']`` IPv6 address. +- Fixed a bug (#4695) - :doc:`User Agent Library ` didn't load the *config/user_agents.php* file when there's no ``User-Agent`` HTTP request header. Version 3.0.6 ============= -- cgit v1.2.3-24-g4f1b