Ignore:
Timestamp:
Nov 16, 2021 8:30:58 AM (2 years ago)
Author:
anonymous
Message:

Backport utility functions from v2.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/polyfill/mysql.inc.php

    r699 r756  
    176176            try {
    177177                // Add instance
    178                 $this->_instances[$usePosition] = new Pdo($dsn, $username, $password, $flags);
     178                $this->_instances[$usePosition] = new PDO($dsn, $username, $password, $flags);
    179179
    180180                return $usePosition;
     
    211211            try {
    212212                $this->_params[$link]['databaseName'] = $databaseName;
    213                 return $this->mysql_query("USE {$databaseName}", $link);
     213                return $this->mysql_query("USE `{$databaseName}`", $link);
    214214            } catch (PDOException $e) {
    215215                return false;
     
    265265            static $last = null;
    266266
    267             if ($result === false) {
     267            if ($result === false || $result === null) {
    268268                trigger_error('mysql_fetch_*(): supplied argument is not a valid MySQL result resource', E_USER_WARNING);
    269269                return false;
Note: See TracChangeset for help on using the changeset viewer.