PMCORE-3853 Using array_key_exists() on objects is deprecated. Instead either isset() or property_exists() should be used.
This commit is contained in:
@@ -83,7 +83,7 @@ class DBArrayResultSet extends ResultSetCommon implements ResultSet
|
||||
public function getString($column)
|
||||
{
|
||||
$idx = (is_int($column) ? $column - 1 : $column);
|
||||
if (!array_key_exists($idx, $this->fields)) {
|
||||
if (is_array($this->fields) && !array_key_exists($idx, $this->fields)) {
|
||||
throw new SQLException("Invalid resultset column: " . $column);
|
||||
}
|
||||
if ($this->fields[$idx] === null) {
|
||||
|
||||
@@ -95,7 +95,7 @@ class pakeSimpletestTask
|
||||
{
|
||||
$types = array('text', 'html', 'xml');
|
||||
$type = 'text';
|
||||
if (array_key_exists(0, $args) && in_array($args[0], $types))
|
||||
if (is_array($args) && array_key_exists(0, $args) && in_array($args[0], $types))
|
||||
{
|
||||
$type = $args[0];
|
||||
array_shift($args);
|
||||
|
||||
2
thirdparty/pear/DB/common.php
vendored
2
thirdparty/pear/DB/common.php
vendored
@@ -1348,7 +1348,7 @@ class DB_common extends PEAR
|
||||
if (!is_array($row = $res->fetchRow($fetchmode))) {
|
||||
$ret = array();
|
||||
} else {
|
||||
if (!array_key_exists($col, $row)) {
|
||||
if (is_array($row) && !array_key_exists($col, $row)) {
|
||||
$ret =& $this->raiseError(DB_ERROR_NOSUCHFIELD);
|
||||
} else {
|
||||
$ret = array($row[$col]);
|
||||
|
||||
Reference in New Issue
Block a user