diff options
author | Andrey Andreev <narf@devilix.net> | 2017-11-28 12:12:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 12:12:12 +0100 |
commit | c19cce944e9bf2ea5d56f31793a3049981b35445 (patch) | |
tree | db6be4f2437dcafe9006e02319cb8e2488dbed7b /system/libraries/Pagination.php | |
parent | e1a9410d1a14c20e034d9fbab2da72e0fdf49f17 (diff) | |
parent | 0055dca60260d36a334f29bd61047eb076d38613 (diff) |
[ci skip] Merge pull request #5342 from aanbar/pagination-bc-fix
Preserve attributes from pagination config files
Related: #4454
Diffstat (limited to 'system/libraries/Pagination.php')
-rw-r--r-- | system/libraries/Pagination.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index f26f8a4ed..ece4edac9 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -339,6 +339,8 @@ class CI_Pagination { } } + // Enable rel attribute by default + isset($params['attributes']) OR $params['attributes'] = array(); $this->initialize($params); log_message('info', 'Pagination Class Initialized'); } @@ -353,8 +355,7 @@ class CI_Pagination { */ public function initialize(array $params = array()) { - isset($params['attributes']) OR $params['attributes'] = array(); - if (is_array($params['attributes'])) + if (isset($params['attributes']) && is_array($params['attributes'])) { $this->_parse_attributes($params['attributes']); unset($params['attributes']); |