Otherwise, one might encounter `is_callable("dd")` and a
`function dd(…)` is defined, leading to that function being called
instead of the string being used directly as the replacement.
* `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
\e107\Shims\Internal\InternalTrait::strptime() now tries to run the internal PHP strptime()
function first instead of what's defined, which should defend against accidental infinite
recursion if something else like ./e107_handlers/php_compatibility_handler.php declares
strptime() and calls eShims::strptime().
- NEW: Added \e107\Shims\Internal\StrptimeTrait, which implements PHP internal function
strptime(). On not-Windows, the built-in function is called. If that function fails
or if the operating system is Windows, the alternative pure PHP implementation is
attempted. The first successful call is returned, or false if none are successful.
- MOD: Deprecated e_date::strptime() in favor of eShims::strptime()
- FIX: License misatributed for e_date::strptime() (now eShims::strptime()). The library
used was public domain, not CC BY-NC-SA 2.0 FR by Lionel Sauron.
- MOD: Removed STRPTIME_COMPAT constant now that eShims::strptime() exists
- MOD: Removed support for calling e_date::strptime() with:
- a localized full month name
- a localized abbreviated month name
- AM or PM
- am or pm
because these features were only implemented in Windows mode (STRPTIME_COMPAT).
- MOD: php_compatibility_handler.php now defines global strptime() using the
eShims::strptime() implementation
- NEW: Test all(?) the possibilities of eShims::strptime()
e_shims is an e107 v2-compatible class for the first namespaced core
class, e107\Shims\All.
e107\Shims\All is built from the e107\Shims\InternalShims trait.
e107\Shims\InternalShims currently implements a resilient replacement
for the PHP internal readfile(), which is needed by issue #3528.
As for how the new namespaced classes are handled, the e107 class
(e107_handlers/e107_class.php) has an updated e107::autoload() which
detects namespaced classes and goes to e107::autoload_namespaced().
Namespaced classes handled by e107 are in the \e107 top-level namespace,
and all sub-levels match directory paths under e_HANDLER.