Release Date: Unreleased
4.6.2 release of CodeIgniter4
- Security: The
sanitize_filename()function from the Security helper now supports a second parameter to control whether relative paths are allowed.
- Security: The
Security::sanitizeFilename()method is deprecated. Usesanitize_filename()instead. - Security: The
SecurityInterface::sanitizeFilename()method is deprecated.
- Cache: Fixed a bug where a corrupted or unreadable cache file could cause an unhandled exception in
FileHandler::getItem(). - Database: Fixed a bug where
when()andwhenNot()inConditionalTraitincorrectly evaluated certain falsy values (such as[],0,0.0, and'0') as truthy, causing callbacks to be executed unexpectedly. These methods now cast the condition to a boolean using(bool)to ensure consistent behavior with PHP's native truthiness. - Email: Fixed a bug where
Email::getHostname()failed to use$_SERVER['SERVER_ADDR']when$_SERVER['SERVER_NAME']was not set. - Security: Fixed a bug where the
sanitize_filename()function from the Security helper would throw an error when used in CLI requests. - Session: Fixed a bug where using the
DatabaseHandlerwith an unsupported database driver (such asSQLSRV,OCI8, orSQLite3) did not throw an appropriate error.
See the repo's CHANGELOG.md for a complete list of bugs fixed.