diff options
| author | 2021-01-31 13:04:36 +0100 | |
|---|---|---|
| committer | 2021-01-31 13:04:36 +0100 | |
| commit | 45ee7a36d5de18376c89ef96726c6e88ad37b9ba (patch) | |
| tree | 97e26c123893b7f3395bfa920a90f759d8eecd6d /p/ext.php | |
| parent | 2b007ee989425bdf352b28c6cddead60a54095c6 (diff) | |
PHP8: SimplePie wrong use of isset (#3404)
#fix https://github.com/FreshRSS/FreshRSS/issues/3401 (crash with PHP 8+)
`ceil()` crashes in PHP8+ in case of invalid input such as empty string.
`intval()` fixes the problem with almost identical behaviour than `ceil()` in PHP7- (except for floating point values)
#fix FreshRSS/FreshRSS#3401 (crash with PHP 8+)
Example with feed http://podcast.hr2.de/derTag/podcast.xml
```xml
<enclosure url="https://mp3podcasthr-a.akamaihd.net:443/mp3/podcast/derTag/derTag_20210129_87093232.mp3"
length="" type="audio/mpeg"/>
```
`isset("")` passes and then `ceil("")` crashes due to wrong type in PHP8+:
```
Uncaught TypeError: ceil(): Argument #1 ($num) must be of type
int|float, string given in ./SimplePie/SimplePie/Item.php:2871
```
Upstream patch https://github.com/simplepie/simplepie/pull/670
Diffstat (limited to 'p/ext.php')
0 files changed, 0 insertions, 0 deletions
