e107_handlers/mysql_class.php
Consider simplifying this complex logical expression. Open
Open
if($table && !$where && is_bool($fields))
{
// table is the query, fields used for multi
if($fields) $mode = 'multi';
else $mode = 'single';
Avoid too many return
statements within this method. Open
Open
if($fieldValue == '') { return "''"; }
Avoid too many return
statements within this method. Open
Open
return array();
Avoid too many return
statements within this method. Open
Open
return array();
Avoid too many return
statements within this method. Open
Open
return "'".e107::getParser()->toDB($fieldValue)."'";
Avoid too many return
statements within this method. Open
Open
return "'".$this->escape($fieldValue, false)."'";
Avoid too many return
statements within this method. Open
Open
return FALSE;
Avoid too many return
statements within this method. Open
Open
return ($fieldValue && $fieldValue !== 'NULL' ? "'".$this->escape($fieldValue, false)."'" : 'NULL');
Avoid too many return
statements within this method. Open
Open
return "'". (string) $fieldValue."'";
Avoid too many return
statements within this method. Open
Open
return $ret;
Avoid too many return
statements within this method. Open
Open
return array();
Avoid too many return
statements within this method. Open
Open
return array();
Avoid too many return
statements within this method. Open
Open
return $this->fetch();
Avoid too many return
statements within this method. Open
Open
return e107::getParser()->toNumber($fieldValue);
Avoid too many return
statements within this method. Open
Open
return "'".e107::serialize($fieldValue, true)."'";
Avoid too many return
statements within this method. Open
Open
return FALSE;
Assigning false
to property but \e_db_mysql->mySQLerror
is string
Open
Open
$this->mySQLerror = false;
- Exclude checks
Argument 2 (fields)
is ?'*'|?string
but \e_db_mysql::select()
takes string
defined at /code/e107_handlers/mysql_class.php:619
Open
Open
if($select && !$this->select($table, $fields, $where, $noWhere, $debug))
- Exclude checks
Returning type false
but update()
is declared to return int
Open
Open
if ($result === -1) { return false; } // Error return from mysqli_affected_rows
- Exclude checks
Returning type false
but count()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Assigning bool
to property but \e_db_mysql->mySQLerror
is string
Open
Open
$this->mySQLerror = $mode;
- Exclude checks
Default value for string
$newLink
can't be false
Open
Open
public function db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb, $newLink = FALSE, $mySQLPrefix = MPREFIX)
- Exclude checks
Returning type true
but db_Connect()
is declared to return null|string
Open
Open
return true;
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
$this->db_Query("ALTER TABLE ".$this->mySQLPrefix.$table." AUTO_INCREMENT=1", NULL, 'db_Insert', $debug, $log_type, $log_remark);
- Exclude checks
Returning type false
but delete()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Argument 4 (dbname)
is bool|false
but \mysqli_connect()
takes string
Open
Open
if (!$this->mySQLaccess = @mysqli_connect($this->mySQLserver, $this->mySQLuser, $this->mySQLpassword, $newLink))
- Exclude checks
Assigning array|null
to property but \e_db_mysql->mySQLrows
is int
Open
Open
$rows = $this->mySQLrows = @mysqli_fetch_array($this->mySQLresult);
- Exclude checks
When fetching an array index from a value of type array|true,
found an array index of type true,
but expected the index to be of type int|string
Open
Open
$list[$row[$ordermode]][$key] = $value;
- Exclude checks
Variable $mySQLuser
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($this->mySQLresult = $this->db_Query('SELECT '.$fields.' FROM '.$this->mySQLPrefix.$table.' '.$arg, NULL, 'db_Select', $debug, $log_type, $log_remark))
- Exclude checks
Returning type false
but select()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Assigning int
to property but \e_db_mysql->mySQLresult
is \mysqli_result|bool|false
Open
Open
$this->mySQLresult = mysqli_affected_rows($this->mySQLaccess);
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
$result = $this->mySQLresult = $this->db_Query($query, NULL, 'db_Update', $debug, $log_type, $log_remark);
- Exclude checks
Call to undeclared method \e_db::get_mySQLaccess
Open
Open
$this->mySQLaccess = e107::getDb()->get_mySQLaccess();
- Exclude checks
Variable $mySQLdefaultdb
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Variable $mySQLserver
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Reference to undeclared constant \MYSQLI_REPORT_OFF
Open
Open
mysqli_report(MYSQLI_REPORT_OFF);
- Exclude checks
Argument 2 (fields)
is ?'*'|?string
but \e_db_mysql::select()
takes string
defined at /code/e107_handlers/mysql_class.php:619
Open
Open
if($select && !$this->select($table, $fields, $where, $noWhere, $debug))
- Exclude checks
Expected @param annotation for order
to be before the @param annotation for where
Open
Open
* @param string $where (Optional ) where condition.
- Exclude checks
Reference to undeclared constant \MYSQL_LIGHT
Open
Open
$path = (MYSQL_LIGHT !== true ? MYSQL_LIGHT : '');
- Exclude checks
Variable $mySQLdefaultdb
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Variable $mySQLserver
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Parameter $rli
has undeclared type \mysqli
Open
Open
public function db_Query($query, $rli = NULL, $qry_from = '', $debug = FALSE, $log_type = '', $log_remark = '')
- Exclude checks
Returning type false
but update()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Reference to undeclared property \e_db_mysql->mysqlLastErrText
(Did you mean expr->mySQLlastErrText) Open
Open
$this->mysqlLastErrText = "PDO is required to use the mysql backup() method";
- Exclude checks
Variable $mySQLuser
is undeclared Open
Open
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
- Exclude checks
Variable $mySQLpassword
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Property \e_db_mysql->mySQLaccess
has undeclared type \mysqli
Open
Open
protected $mySQLaccess;
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($this->mySQLresult = $this->db_Query($query, NULL, 'db_Count', $debug, $log_type, $log_remark))
- Exclude checks
Call to method set_charset
from undeclared class \mysqli
Invalid
Invalid
$this->mySQLaccess->set_charset($charset);
- Exclude checks
Assigning false
to property but \e_db_mysql->mySQLerror
is string
Open
Open
$this->mySQLerror = false;
- Exclude checks
Return type of db_Query()
is undeclared type \mysqli_result
Open
Open
public function db_Query($query, $rli = NULL, $qry_from = '', $debug = FALSE, $log_type = '', $log_remark = '')
- Exclude checks
Argument 2 (fields)
is ?'*'|?string
but \e_db_mysql::select()
takes string
defined at /code/e107_handlers/mysql_class.php:619
Open
Open
if($select && !$this->select($table, $fields, $where, $noWhere, $debug))
- Exclude checks
Checking instanceof against undeclared class \mysqli_result
Open
Open
if ($result instanceof mysqli_result)
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($result = $this->mySQLresult = $this->db_Query('UPDATE '.$this->mySQLPrefix.$table.' SET '.$new_data.$vars.' '.$arg, NULL, 'db_UpdateArray', $debug, $log_type, $log_remark))
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($result = $this->mySQLresult = $this->db_Query('DELETE FROM '.$this->mySQLPrefix.$table, NULL, 'db_Delete', $debug, $log_type, $log_remark))
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($result = $this->mySQLresult = $this->db_Query('DELETE FROM '.$this->mySQLPrefix.$table.' WHERE '.$arg, NULL, 'db_Delete', $debug, $log_type, $log_remark))
- Exclude checks
Default value for object
$mode
can't be string
Open
Open
public function tables($mode='all')
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool TRUE enter debug mode. default FALSE':
after bool,
did not see an element name (will guess based on comment order) Open
Open
* @param bool TRUE enter debug mode. default FALSE
- Exclude checks
Return type of get_mySQLaccess()
is undeclared type \mysqli
Open
Open
public function get_mySQLaccess()
- Exclude checks
Variable $mySQLpassword
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Returning type null
but db_Mark_Time()
is declared to return void
Open
Open
return null;
- Exclude checks
Returning type false
but select()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Argument 2 (haystack)
is string
but \in_array()
takes array
Open
Open
if (strtoupper($fields) == 'ALL' || in_array ($key, $fields))
- Exclude checks
Returning type ?\mysqli_result|?bool|?int
but db_CopyTable()
is declared to return \mysqli_result|bool|int
Open
Open
return $result;
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
$this->db_Query("SET NAMES `$charset`", NULL, '', $debug);
- Exclude checks
Variable $mySQLpassword
is undeclared Open
Open
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
- Exclude checks
Parameter $result
has undeclared type \mysqli_result
Open
Open
public function rowCount($result=null)
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string fields to retrieve':
after string,
did not see an element name (will guess based on comment order) Open
Open
* @param string fields to retrieve
- Exclude checks
Reference to undeclared property \e_db_mysql->mysqlLastErrText
(Did you mean expr->mySQLlastErrText) Open
Open
$this->mysqlLastErrText = "copyRow \$fields list was empty";
- Exclude checks
Assigning int
to property but \e_db_mysql->total_results
is false
Open
Open
$this->total_results = (int)$rc['FOUND_ROWS()'];
- Exclude checks
Returning type false
but select()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($this->mySQLresult = $this->db_Query($query, NULL, 'db_Count', $debug, $log_type, $log_remark))
- Exclude checks
Return type of db_CopyTable()
is undeclared type \mysqli_result
Open
Open
function db_CopyTable($oldtable, $newtable, $drop = FALSE, $data = FALSE)
- Exclude checks
Variable $mySQLprefix
is undeclared Open
Open
define('MPREFIX', $mySQLprefix);
- Exclude checks
Variable $mySQLuser
is undeclared Open
Open
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
- Exclude checks
Variable $mySQLdefaultdb
is undeclared Open
Open
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
- Exclude checks
Returning type false
but count()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if (($this->mySQLresult = $this->db_Query($query, NULL, 'db_Select_gen', $debug, $log_type, $log_remark)) === FALSE)
- Exclude checks
Returning type null
but retrieve()
is declared to return array|string
Open
Open
return null;
- Exclude checks
Checking instanceof against undeclared class \mysqli_result
Open
Open
if (!($result instanceof mysqli_result))
- Exclude checks
Returning type false
but delete()
is declared to return int
Open
Open
return FALSE;
- Exclude checks
Variable $mySQLserver
is undeclared Open
Open
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
- Exclude checks
Returning type null
but retrieve()
is declared to return array|string
Open
Open
return null;
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($this->mySQLresult = $this->db_Query('SELECT '.$fields.' FROM '.$this->mySQLPrefix.$table.' WHERE '.$arg, NULL, 'db_Select', $debug, $log_type, $log_remark))
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
$this->mySQLresult = $this->db_Query($query, NULL, 'db_Insert', $debug, $log_type, $log_remark);
- Exclude checks
Variable $mySQLprefix
is undeclared Open
Open
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix');
- Exclude checks
Argument 2 (rli)
is null
but \e_db_mysql::db_Query()
takes \mysqli
defined at /code/e107_handlers/mysql_class.php:384
Open
Open
if ($this->mySQLresult = $this->db_Query('SELECT '.$fields.' FROM '.$this->mySQLPrefix.$table, NULL, 'db_Select', $debug, $log_type, $log_remark))
- Exclude checks
Assigning array|null
to property but \e_db_mysql->mySQLrows
is int
Open
Open
$rows = $this->mySQLrows = @mysqli_fetch_array($this->mySQLresult);
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string MySQL charset may be forced in special circumstances':
after string,
did not see an element name (will guess based on comment order) Open
Open
* @param string MySQL charset may be forced in special circumstances
- Exclude checks