In Util::removeHtmlComments(), there's a preg_replace call to remove HTML comments. When preg_replace have an error, it'll return a null value.
Since the preg_replace return value if fed directly in the trim function, we get this error message : TypeError: trim(): Argument #1 ($string) must be of type string, null given in trim() (line 68 of modules/contrib/sdc_display/src/Util.php).
In our case, we have a CKEditor field where the content editor decided to hive a huge part of the page by using HTML comments. This triggered a PREG_JIT_STACKLIMIT_ERROR from the preg_replace function.
Refactor that function a bit so it can handle preg_replace errors. I think that any preg_replace errors could be raised as warnings in the Drupal logs, and we'd simply return the input untouched.
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.