summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-11-28 12:12:12 +0100
committerAndrey Andreev <narf@devilix.net>2017-11-28 12:15:11 +0100
commit75db0cfa371941cbd7743d0523bbe3460688fc37 (patch)
tree32918017259a20462abaac8ca2d3f6520bd0832f /system/libraries
parent4a567782a2ece1ceffebfc1efa580f654df8be1f (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')
-rw-r--r--system/libraries/Pagination.php5
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']);