Merge pull request #1304 from petsagouris/minor-assignment-fix
Minor assignment fix.
diff --git a/system/core/Input.php b/system/core/Input.php
index 7594a2e..fc2a550 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -226,7 +226,6 @@
*/
public function cookie($index = '', $xss_clean = FALSE)
{
- $index = config_item('cookie_prefix').$index;
return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
}
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index 629a3ad..dd2df69 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -723,7 +723,7 @@
{
if (is_object($result))
{
- $json_result = $result->result_array();
+ $json_result = is_callable(array($result, 'result_array')) ? $result->result_array() : (array) $result;
}
elseif (is_array($result))
{
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index 0fe73d6..3d29118 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -94,17 +94,16 @@
{
foreach ($params as $key => $val)
{
- if (isset($this->$key))
+ if ($key === 'anchor_class')
+ {
+ $this->anchor_class = ($val != '') ? 'class="'.$val.'" ' : '';
+ }
+ elseif (isset($this->$key))
{
$this->$key = $val;
}
}
}
-
- if ($this->anchor_class != '')
- {
- $this->anchor_class = 'class="'.$this->anchor_class.'" ';
- }
}
// --------------------------------------------------------------------