You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BUG] PHP Fatal error: Uncaught TypeError: strspn(): Argument #1 ($string) must be of type string, null given in /framework/simplepie/src/Content/Type/Sniffer.php:153
#810
Open
thE-iNviNciblE opened this issue
Mar 18, 2023
· 3 comments
This part of the code will be re-done with #774 so that will hopefully fix it properly.
thE-iNviNciblE
changed the title
[BUG] PHP Fatal error: Uncaught TypeError: strspn(): Argument #1 ($string) must be of type string, null given in /var/www/vhosts/xxx/framework/simplepie/src/Content/Type/Sniffer.php:153
[BUG] PHP Fatal error: Uncaught TypeError: strspn(): Argument #1 ($string) must be of type string, null given in /framework/simplepie/src/Content/Type/Sniffer.php:153
Mar 18, 2023
Description
$ws = strspn($this->file->body, "\x09\x0A\x0B\x0C\x0D\x20");
- simplepie/src/Content/Type/Sniffer.php:153$this->file->body is empty.
Steps to Reproduce
it's maybe a empty resource where the DOM HTML is empty.
Expected Behavior
skip invalid RSS-Source.
Actual Behavior
Fatal error cron job exits.
Possible Solutions
strlen() Check should work to avoid strspn() to crash.
Environment
Debian 10 with PHP 8.2
The text was updated successfully, but these errors were encountered: