1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 23:56:58 +02:00

PHP 5.6 fixes for e_db_mysql

- FIX: Don't redefine MYSQL_* constants in e_db_pdo_class.php
- FIX: e_db_mysql::rowCount() could try to use mysql_num_rows() to count rows of a non-resource
- FIX: e_db_mysql::delete() stores the number of deleted rows in e_db_mysql::$mySQLrows
- FIX: e_db_abstractTest::testDb_Query() was fetching in PDO mode but shouldn't have been
- FIX: Typos in e_db_abstractTest::testDelete()
- MOD: Moved PDO-exclusive testBackup() from e_db_abstractTest to e_db_pdoTest
- FIX: e_db_mysqlTest now works in PHP 5.6 if the main e_db instance was in PDO mode but the test
       class initializes in legacy mode
- MOD: e_db_mysqlTest now asserts that PDO mode is not in use
- FIX: e_db_mysqlTest::testGetServerInfo() should now actually get a version number
- FIX: e_db_mysqlTest::testGetLastErrorNumber() has a different error code compared to PDO
- FIX: e_db_mysqlTest::testEscape() should actually get something from mysql_real_escape_string()
This commit is contained in:
Nick Liu
2020-01-19 12:30:23 +01:00
parent 970f65b705
commit 72d3f07410
5 changed files with 108 additions and 80 deletions

View File

@@ -6,9 +6,9 @@
*/
// Legacy Fix.
define('MYSQL_ASSOC', 1);
define('MYSQL_NUM', 2);
define('MYSQL_BOTH', 3);
defined('MYSQL_ASSOC') or define('MYSQL_ASSOC', 1);
defined('MYSQL_NUM') or define('MYSQL_NUM', 2);
defined('MYSQL_BOTH') or define('MYSQL_BOTH', 3);
require_once('e_db_interface.php');
require_once('e_db_legacy_trait.php');