Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHP 8.1: fix "passing null to non-nullable" deprecation notice
As of PHP 8.1, passing `null` to non-nullable arguments of PHP native functions is deprecated. Ref: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg The `SimplePie_Enclosure::get_extension()` returns the file extension as a string or `null`. In the `SimplePie_Enclosure::get_real_type()` method, the return value of a call to the `get_extension()` method was directly passed on to the PHP native `strtolower()` function, leading to the PHP 8.1 `strtolower(): Passing null to parameter simplepie#1 ($string) of type string is deprecated` deprecation notice. This small change fixes this issue without BC break. This is covered by 36 of the existing tests in the `OldTest` class.
- Loading branch information