Problem/Motivation

I'm getting the following notice:
Deprecated function: preg_quote(): Passing null to parameter #1 ($str) of type string is deprecated in Drupal\geofield_map\Services\MarkerIconService->setMarkersFilesList() (line 196 of /var/www/html/docroot/modules/contrib/geofield_map/src/Services/MarkerIconService.php)

Proposed resolution

Adding an extra check before calling the preg_quote function

Comments

jasdeba created an issue. See original summary.

shreya_th’s picture

@jasdeba i had applied your patch and run this module in local setup and its working fine not getting error.
Kindly merge this patch file in source code.

keshavv’s picture

Status: Active » Needs review

  • itamair committed bd62bcc7 on 8.x-2.x authored by jasdeba
    Issue #3383276 by jasdeba: PHP 8.1 Deprecated function: preg_quote():...
itamair’s picture

Status: Needs review » Fixed

provided patch committed into dve, will be part of next Geofield Map release.

  • itamair committed 22a45845 on 3.0.x authored by jasdeba
    Issue #3383276 by jasdeba: PHP 8.1 Deprecated function: preg_quote():...

Status: Fixed » Closed (fixed)

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