- Issue created by @aitala
- Status changed to Needs review
almost 2 years ago 11:32am 2 March 2023 - Status changed to Needs work
almost 2 years ago 3:39pm 2 March 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- elseif (drupal_strlen($field_handler->last_render) != drupal_strlen(strip_tags($field_handler->last_render))) { + elseif (drupal_strlen($field_handler->last_render) != drupal_strlen(strip_tags((string) $field_handler->last_render ?? ''))) {
If
$field_handler->last_render
is not a string, it is pointless to execute that code, as zero (drupal_strlen($field_handler->last_render)
) is equal to zero (drupal_strlen(strip_tags((string) $field_handler->last_render ?? '')
). - First commit to issue fork.
- Status changed to Needs review
over 1 year ago 7:28am 31 March 2023 - 🇮🇳India sahil.goyal
Addressed the comment #4, So to address this issue modified the code to check if
$field_handler->last_render
is a string before executing thedrupal_strlen
andstrip_tags
functions.
Before attempting to check here its length and strip out any tags, If$field_handler->last_render
is not a string, the code inside the if statement will not be executed.So updating the patch and attaching Interdiff.