summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/codeigniter/CodeIgniter.php2
-rw-r--r--system/database/DB_active_rec.php4
-rw-r--r--system/database/DB_driver.php4
-rw-r--r--system/helpers/typography_helper.php26
-rw-r--r--system/libraries/Calendar.php4
-rw-r--r--system/libraries/Config.php2
-rw-r--r--system/libraries/Controller.php6
-rw-r--r--system/libraries/Email.php6
-rw-r--r--system/libraries/Image_lib.php2
-rw-r--r--system/libraries/Language.php2
-rw-r--r--system/libraries/Unit_test.php2
-rw-r--r--system/libraries/Upload.php4
-rw-r--r--system/libraries/Validation.php6
-rw-r--r--system/libraries/Xmlrpc.php2
14 files changed, 36 insertions, 36 deletions
diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 4ac03820a..a4f18b0e1 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -145,7 +145,7 @@ $method = $RTR->fetch_method();
if ( ! class_exists($class)
OR $method == 'controller'
OR substr($method, 0, 1) == '_'
- OR in_array($method, get_class_methods('Controller'))
+ OR in_array($method, get_class_methods('Controller'), TRUE)
)
{
show_404();
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index eb9f14a92..1fa4f9557 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -125,7 +125,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
$type = strtoupper(trim($type));
- if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER')))
+ if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE))
{
$type = '';
}
@@ -390,7 +390,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
if (trim($direction) != '')
{
- $direction = (in_array(strtoupper(trim($direction)), array('ASC', 'DESC', 'RAND()'))) ? ' '.$direction : ' ASC';
+ $direction = (in_array(strtoupper(trim($direction)), array('ASC', 'DESC', 'RAND()'), TRUE)) ? ' '.$direction : ' ASC';
}
$this->ar_orderby[] = $orderby.$direction;
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index d25135ea6..94db84bbf 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -726,8 +726,8 @@ class CI_DB_driver {
}
else
{
- $args = (func_num_args() > 1) ? array_shift(func_get_args()) : null;
-
+ $args = (func_num_args() > 1) ? array_splice(func_get_args(), 1) : null;
+
return call_user_func_array($function, $args);
}
}
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 6a5495239..65924f911 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -275,13 +275,13 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+2, 1);
- if ( ! in_array($one_after, $space) && $one_after != "<")
+ if ( ! in_array($one_after, $space, TRUE) && $one_after != "<")
{
$str = str_replace( $one_before."\"'".$one_after,
$one_before."&#8220;&#8216;".$one_after,
$str);
}
- elseif ( ! in_array($one_before, $space) && (in_array($one_after, $space) OR $one_after == '<'))
+ elseif ( ! in_array($one_before, $space, TRUE) && (in_array($one_after, $space, TRUE) OR $one_after == '<'))
{
$str = str_replace( $one_before."\"'".$one_after,
$one_before."&#8221;&#8217;".$one_after,
@@ -302,13 +302,13 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+2, 1);
- if ( in_array($one_before, $space) && ! in_array($one_after, $space) && $one_after != "<")
+ if ( in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE) && $one_after != "<")
{
$str = str_replace( $one_before."'\"".$one_after,
$one_before."&#8216;&#8220;".$one_after,
$str);
}
- elseif ( ! in_array($one_before, $space) && $one_before != ">")
+ elseif ( ! in_array($one_before, $space, TRUE) && $one_before != ">")
{
$str = str_replace( $one_before."'\"".$one_after,
$one_before."&#8217;&#8221;".$one_after,
@@ -323,7 +323,7 @@ class Auto_typography {
{
for ($i=0, $s=sizeof($matches['0']); $i < $s; ++$i)
{
- if ( ! in_array($matches['1'][$i], $space) && ! in_array($matches['3'][$i], $space))
+ if ( ! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE))
{
$str = str_replace( $matches['0'][$i],
$matches['1'][$i]."&#8220;".$matches['2'][$i]."&#8221;".$matches['3'][$i],
@@ -336,7 +336,7 @@ class Auto_typography {
{
for ($i=0, $s=sizeof($matches['0']); $i < $s; ++$i)
{
- if ( ! in_array($matches['1'][$i], $space) && ! in_array($matches['3'][$i], $space))
+ if ( ! in_array($matches['1'][$i], $space, TRUE) && ! in_array($matches['3'][$i], $space, TRUE))
{
$str = str_replace( $matches['0'][$i],
$matches['1'][$i]."&#8216;".$matches['2'][$i]."&#8217;".$matches['3'][$i],
@@ -357,7 +357,7 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+1, 1);
- if ( ! in_array($one_before, $space) && ! in_array($one_after, $space))
+ if ( ! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8217;".$one_after,
@@ -380,9 +380,9 @@ class Auto_typography {
$two_before = substr($str, $start+$current-2, 1);
$two_after = substr($str, $start+$current+3, 1);
- if (( ! in_array($one_before, $space) && ! in_array($one_after, $space))
+ if (( ! in_array($one_before, $space, TRUE) && ! in_array($one_after, $space, TRUE))
OR
- ( ! in_array($two_before, $space) && ! in_array($two_after, $space) && $one_before == ' ' && $one_after == ' ')
+ ( ! in_array($two_before, $space, TRUE) && ! in_array($two_after, $space, TRUE) && $one_before == ' ' && $one_after == ' ')
)
{
$str = str_replace( $two_before.$one_before."--".$one_after.$two_after,
@@ -413,13 +413,13 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+1, 1);
- if ( ! in_array($one_after, $space))
+ if ( ! in_array($one_after, $space, TRUE))
{
$str = str_replace( $one_before.'"'.$one_after,
$one_before."&#8220;".$one_after,
$str);
}
- elseif( ! in_array($one_before, $space))
+ elseif( ! in_array($one_before, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8221;".$one_after,
@@ -440,13 +440,13 @@ class Auto_typography {
$one_before = substr($str, $start+$current-1, 1);
$one_after = substr($str, $start+$current+1, 1);
- if ( ! in_array($one_after, $space))
+ if ( ! in_array($one_after, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8216;".$one_after,
$str);
}
- elseif( ! in_array($one_before, $space))
+ elseif( ! in_array($one_before, $space, TRUE))
{
$str = str_replace( $one_before."'".$one_after,
$one_before."&#8217;".$one_after,
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index 8c7d95aa5..8cf151703 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -48,7 +48,7 @@ class CI_Calendar {
function CI_Calendar()
{
$this->obj =& get_instance();
- if ( ! in_array('calendar_lang'.EXT, $this->obj->lang->is_loaded))
+ if ( ! in_array('calendar_lang'.EXT, $this->obj->lang->is_loaded, TRUE))
{
$this->obj->lang->load('calendar');
}
@@ -458,7 +458,7 @@ class CI_Calendar {
}
else
{
- if (in_array($val, $today))
+ if (in_array($val, $today, TRUE))
{
$this->temp[$val] = $this->temp[str_replace('_today', '', $val)];
}
diff --git a/system/libraries/Config.php b/system/libraries/Config.php
index 108c94ab7..26770cc4f 100644
--- a/system/libraries/Config.php
+++ b/system/libraries/Config.php
@@ -63,7 +63,7 @@ class CI_Config {
{
$file = ($file == '') ? 'config' : str_replace(EXT, '', $file);
- if (in_array($file, $this->is_loaded))
+ if (in_array($file, $this->is_loaded, TRUE))
{
return TRUE;
}
diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php
index f00a7262b..ff914d131 100644
--- a/system/libraries/Controller.php
+++ b/system/libraries/Controller.php
@@ -239,7 +239,7 @@ class Controller extends CI_Base {
}
$obj =& get_instance();
- if (in_array($name, $obj->_ci_models))
+ if (in_array($name, $obj->_ci_models, TRUE))
{
return;
}
@@ -350,7 +350,7 @@ class Controller extends CI_Base {
foreach ($autoload['libraries'] as $item)
{
- if ( ! in_array($item, $exceptions))
+ if ( ! in_array($item, $exceptions, TRUE))
{
$this->_ci_load_class($item);
}
@@ -566,7 +566,7 @@ class Controller extends CI_Base {
if (class_exists('Scaffolding')) return;
- if ( ! in_array($this->uri->segment(3), array('add', 'insert', 'edit', 'update', 'view', 'delete', 'do_delete')))
+ if ( ! in_array($this->uri->segment(3), array('add', 'insert', 'edit', 'update', 'view', 'delete', 'do_delete'), TRUE))
{
$method = 'view';
}
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 5b991d1fa..55edd6216 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -467,7 +467,7 @@ class CI_Email {
*/
function set_protocol($protocol = 'mail')
{
- $this->protocol = ( ! in_array($protocol, $this->_protocols)) ? 'mail' : strtolower($protocol);
+ $this->protocol = ( ! in_array($protocol, $this->_protocols, TRUE)) ? 'mail' : strtolower($protocol);
}
// END set_protocol()
@@ -564,7 +564,7 @@ class CI_Email {
function _get_protocol($return = true)
{
$this->protocol = strtolower($this->protocol);
- $this->protocol = ( ! in_array($this->protocol, $this->_protocols)) ? 'mail' : $this->protocol;
+ $this->protocol = ( ! in_array($this->protocol, $this->_protocols, TRUE)) ? 'mail' : $this->protocol;
if ($return == true)
return $this->protocol;
@@ -584,7 +584,7 @@ class CI_Email {
{
$this->_encoding = ( ! in_array($this->_encoding, $this->_bit_depths)) ? '7bit' : $this->_encoding;
- if ( ! in_array($this->charset, $this->_base_charsets))
+ if ( ! in_array($this->charset, $this->_base_charsets, TRUE))
$this->_encoding = "8bit";
if ($return == true)
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 18e3253f7..ca1d7478b 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -398,7 +398,7 @@ class CI_Image_lib {
// Allowed rotation values
$degs = array(90, 180, 270, 'vrt', 'hor');
- if ($this->rotation_angle == '' OR ! in_array($this->rotation_angle, $degs))
+ if ($this->rotation_angle == '' OR ! in_array($this->rotation_angle, $degs, TRUE))
{
$this->set_error('imglib_rotation_angle_required');
return FALSE;
diff --git a/system/libraries/Language.php b/system/libraries/Language.php
index 41dab46f4..dabfd4145 100644
--- a/system/libraries/Language.php
+++ b/system/libraries/Language.php
@@ -54,7 +54,7 @@ class CI_Language {
{
$langfile = str_replace(EXT, '', str_replace('_lang.', '', $langfile)).'_lang'.EXT;
- if (in_array($langfile, $this->is_loaded))
+ if (in_array($langfile, $this->is_loaded, TRUE))
{
return;
}
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index d3e151328..78b92edb2 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -57,7 +57,7 @@ class CI_Unit_test {
if ($this->active == FALSE)
return;
- if ($expected !== 0 AND in_array($expected, array('is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null')))
+ if (in_array($expected, array('is_string', 'is_bool', 'is_true', 'is_false', 'is_int', 'is_numeric', 'is_float', 'is_double', 'is_array', 'is_null'), TRUE))
{
$expected = str_replace('is_float', 'is_double', $expected);
$result = ($expected($test)) ? TRUE : FALSE;
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 091c6c30d..37fccdfd8 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -454,7 +454,7 @@ class CI_Upload {
);
- return (in_array($this->file_type, $img_mimes)) ? TRUE : FALSE;
+ return (in_array($this->file_type, $img_mimes, TRUE)) ? TRUE : FALSE;
}
// --------------------------------------------------------------------
@@ -479,7 +479,7 @@ class CI_Upload {
if (is_array($mime))
{
- if (in_array($this->file_type, $mime))
+ if (in_array($this->file_type, $mime, TRUE))
{
return TRUE;
}
diff --git a/system/libraries/Validation.php b/system/libraries/Validation.php
index 80ee6a533..7db67a3e1 100644
--- a/system/libraries/Validation.php
+++ b/system/libraries/Validation.php
@@ -187,7 +187,7 @@ class CI_Validation {
$ex = explode('|', $rules);
// Is the field required? If not, if the field is blank we'll move on to the next text
- if ( ! in_array('required', $ex) AND strpos($rules, 'callback_') === FALSE)
+ if ( ! in_array('required', $ex, TRUE) AND strpos($rules, 'callback_') === FALSE)
{
if ( ! isset($_POST[$field]) OR $_POST[$field] == '')
{
@@ -206,7 +206,7 @@ class CI_Validation {
*/
if ( ! isset($_POST[$field]))
{
- if (in_array('isset', $ex) OR in_array('required', $ex))
+ if (in_array('isset', $ex, TRUE) OR in_array('required', $ex))
{
if ( ! isset($this->_error_messages['isset']))
{
@@ -268,7 +268,7 @@ class CI_Validation {
$result = $this->obj->$rule($_POST[$field], $param);
// If the field isn't required and we just processed a callback we'll move on...
- if ( ! in_array('required', $ex) AND $result !== FALSE)
+ if ( ! in_array('required', $ex, TRUE) AND $result !== FALSE)
{
continue 2;
}
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index f90785430..4cb16f74e 100644
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -854,7 +854,7 @@ class XML_RPC_Message extends CI_Xmlrpc
else
{
// not top level element: see if parent is OK
- if (!in_array($this->xh[$the_parser]['stack'][0], $this->valid_parents[$name]))
+ if (!in_array($this->xh[$the_parser]['stack'][0], $this->valid_parents[$name], TRUE))
{
$this->xh[$the_parser]['isf'] = 2;
$this->xh[$the_parser]['isf_reason'] = "XML-RPC element $name cannot be child of ".$this->xh[$the_parser]['stack'][0];