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
{{ message }}
Repository navigation
Fatal error when using emphasize tags around a string #148
PHP Fatal error: Uncaught TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, null given in /vendor/tempest/highlight/src/Languages/Base/Injections/AdditionInjection.php:21
Stack trace:
#0 /vendor/tempest/highlight/src/Languages/Base/Injections/AdditionInjection.php(21): str_replace()
#1 /vendor/tempest/highlight/src/Highlighter.php(146): Tempest\Highlight\Languages\Base\Injections\AdditionInjection->parse()
#2 /vendor/tempest/highlight/src/Highlighter.php(96): Tempest\Highlight\Highlighter->parseContent()
#3 reproduce.php(11): Tempest\Highlight\Highlighter->parse()
#4 {main}
thrown in /vendor/tempest/highlight/src/Languages/Base/Injections/AdditionInjection.php on line 21
Activity
nicwortel commentedon Sep 1, 2024
Strangely enough I'm unable to reproduce the issue with
preg_replacein isolation.When I copy the value of
$contentand try to reproduce this on 3v4l.org it doesn't returnnull:https://3v4l.org/FWi3n
base-zero commentedon Apr 10, 2025
I'm seeing the same issue and error message after upgrading on a page with commonmark content that was working last year and hasn't been changed.
brendt commentedon Apr 10, 2025
I'll look into this! Although I'm a week on holiday currently