summaryrefslogtreecommitdiffstats
path: root/system/libraries/Javascript.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Javascript.php')
-rw-r--r--system/libraries/Javascript.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index dd2df697c..5c8b09217 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -615,12 +615,12 @@ 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');
}
- if ($relative === TRUE OR strncmp($external_file, 'http://', 7) === 0 OR strncmp($external_file, 'https://', 8) === 0)
+ if ($relative === TRUE OR strpos($external_file, 'http://') === 0 OR strpos($external_file, 'https://') === 0)
{
$str = $this->_open_script($external_file);
}
@@ -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.'">');
}
// --------------------------------------------------------------------