strip_tags() function is deprecated

PHP 8.1.27
Drupal 9.4.7
Geofield Map 3.0.15

Watchdog message :

Deprecated function : strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\geofield_map\Plugin\views\style\GeofieldGoogleMapViewStyle->render() (/app/www/modules/contrib/geofield_map/src/Plugin/views/style/GeofieldGoogleMapViewStyle.php ligne 1021)

CommentFileSizeAuthor
#4 geofield_map-3424836.patch1.05 KBabhishek_gupta1

Comments

yom created an issue. See original summary.

yom’s picture

Issue summary: View changes
dineshkumarbollu’s picture

@yom, try to call strip_tags() method after checking NULL may fix the issue.

$tooltip = isset($entity) && !empty($tooltip_field) ? $this->rendered_fields[$id][$tooltip_field] ?? NULL : NULL;

if ($tooltip !== NULL) {
    $tooltip = trim(html_entity_decode(strip_tags($tooltip), ENT_QUOTES));
}
abhishek_gupta1’s picture

Status: Active » Needs review
StatusFileSize
new1.05 KB

@yom , fixed the issue and created Patch.please kindly review it

yom’s picture

Assigned: yom » Unassigned
yom’s picture

Thank you very much ! The patch works like a charm :)

itamair’s picture

Status: Needs review » Fixed

thanks. Patch #4 committed into dev, will be part of the next Geofield Map release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.