* `strftime()` has been replaced with a polyfill based on `DateTime`.
* Explicit type casts/assertions added where required by PHP 8.1
* `filter_var(…, FILTER_SANITIZE_STRING)` replaced with `strip_tags()`
or HTML entity encoding of quotation marks, depending on a guess of
what the intended "sanitization" was
* `http_build_query()` usage type mismatches fixed
* Removed usages of the `FILE_TEXT` constant
* To avoid breaking PHP 5.6 compatibility (function return types),
`e_session_db` no longer implements `SessionHandlerInterface`.
Instead, the alternative non-OOP invocation of
`session_set_save_handler()` is used instead to apply the session
handler.
* The shim for `strptime()` still calls the native function if available
but now suppresses the deprecation warning.
* `e_db_pdo` explicitly asks for `PDO::ATTR_STRINGIFY_FETCHES` to
maintain consistent behavior with past versions of PHP.
* `e_db_mysql` explicitly sets `mysqli_report(MYSQLI_REPORT_OFF)` to
maintain consistent behavior with past versions of PHP.
* Removed pointless random number generator seed from `banner` plugin
* Workaround for `COUNT(*)` SQL query in
`validatorClass::dbValidateArray()` without a proper API for avoiding
SQL injection
- MOD: Silently ignore failures to e_db_mysql::close(); if it's failing, it's probably already closed
- FIX: Close the PDO or mysqli connection after each e_db_abstractTest test
- MOD: Changed class2.php's $sql variable to be hinted as an e_db instead of 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()
- FIX: Silenced compact() in e107Test::testInitCore()
- FIX: Null check in e_db_pdo::makeTableDef()
- FIX: Null check in e_db_mysql::makeTableDef()
- FIX: userlogin::login() had this warning on line 148:
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Increased possible random strings for unique fields in e_db_pdo::copyRow() from 1000 to 59^11 (UserHandler::generateRandomString() "alphanumeric" should have 59 characters to choose from)
If a collision still happens, e_db_pdo::copyRow() retries up to 3 times for a successful copy.
Fixes: #3678
Caused by: a4c6fd8b5bf268ae7032acb14f4476a192a48b62
- FIX: MySQL table prefix is lost due to cyclic e_db_pdo::database() call that loses the prefix and reverts back to the default prefix, MPREFIX or "e107_".