diff options
Diffstat (limited to 'system/libraries/Javascript.php')
-rw-r--r-- | system/libraries/Javascript.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 629a3adfe..98fec61d3 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -615,7 +615,7 @@ class CI_Javascript { { $this->_javascript_location = $external_file; } - elseif ($this->CI->config->item('javascript_location') != '') + elseif ($this->CI->config->item('javascript_location') !== '') { $this->_javascript_location = $this->CI->config->item('javascript_location'); } @@ -667,7 +667,7 @@ class CI_Javascript { protected function _open_script($src = '') { return '<script type="text/javascript" charset="'.strtolower($this->CI->config->item('charset')).'"' - .($src == '' ? '>' : ' src="'.$src.'">'); + .($src === '' ? '>' : ' src="'.$src.'">'); } // -------------------------------------------------------------------- @@ -723,7 +723,7 @@ class CI_Javascript { { 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)) { |