mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Issue #1356 - More PHP7 Fixes.
This commit is contained in:
@@ -1168,45 +1168,40 @@ class e_db_mysql
|
|||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case 'both':
|
case 'both':
|
||||||
case MYSQL_BOTH:
|
case 3:
|
||||||
$type = MYSQL_BOTH; // 3
|
$type = ($this->pdo) ? PDO::FETCH_BOTH: MYSQL_BOTH; // 3
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'num':
|
case 'num':
|
||||||
case MYSQL_NUM: // 2
|
case 2:
|
||||||
$type = MYSQL_NUM;
|
$type = ($this->pdo) ? PDO::FETCH_NUM : MYSQL_NUM;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'assoc':
|
case 'assoc':
|
||||||
case MYSQL_ASSOC: // 1
|
case 1:
|
||||||
default:
|
default:
|
||||||
$type = MYSQL_ASSOC;
|
$type = ($this->pdo) ? PDO::FETCH_ASSOC : MYSQL_ASSOC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
elseif($this->pdo) // convert type to PDO.
|
||||||
{
|
{
|
||||||
|
switch ($type)
|
||||||
if($this->pdo) // convert type to PDO.
|
|
||||||
{
|
{
|
||||||
switch ($type)
|
case 'both': // 3
|
||||||
{
|
$type = PDO::FETCH_BOTH;
|
||||||
case 'both': // 3
|
break;
|
||||||
$type = PDO::FETCH_BOTH;
|
case 'num': // 2
|
||||||
break;
|
$type = PDO::FETCH_NUM;
|
||||||
|
break;
|
||||||
case 'num': // 2
|
|
||||||
$type = PDO::FETCH_NUM;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'assoc': // 1
|
case 'assoc': // 1
|
||||||
default:
|
default:
|
||||||
$type = PDO::FETCH_ASSOC;
|
$type = PDO::FETCH_ASSOC;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$b = microtime();
|
$b = microtime();
|
||||||
if($this->mySQLresult)
|
if($this->mySQLresult)
|
||||||
|
Reference in New Issue
Block a user