Browse Source

compat PHP 8 : éviter des warnings du type Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated

appliquer strval sur les balises qui peuvent être vides/nulles avant d'appliquer trim
pull/41/head
b_b 5 months ago
parent
commit
e9c32b9b0e
  1. 46
      modeles/carte_gis.html

46
modeles/carte_gis.html

@ -104,21 +104,21 @@ var jQgisloader;
mapId: '[(#GET{id})]',
callback: (typeof(callback_map[(#GET{id})]) === "function") ? callback_map[(#GET{id})] : false,
center: [#GET{lat},#GET{lon}],
zoom: [(#ENV{zoom,#CONFIG{gis/zoom,0}}|trim)][,
maxZoom: (#ENV{maxZoom}|trim)][,
minZoom: (#ENV{minZoom}|trim)][,
default_layer: '(#ENV{default_layer}|trim)'][,
affiche_layers: (#ENV{affiche_layers}|trim|?{[(#ENV{affiche_layers}|trim|explode{/}|json_encode)],''})],
scrollWheelZoom: [(#ENV{zoom_molette,#ENV{zoom_wheel}}|trim|=={non}|?{false,true})],
zoomControl: [(#ENV{no_control,#ENV{aucun_controle}}|trim|!={oui}|?{true,false})],
fullscreenControl: [(#ENV{fullscreen}|trim|=={oui}|?{true,false})],
scaleControl: [(#ENV{scale}|trim|=={oui}|?{true,false})],
overviewControl:[(#ENV{overview}|trim|=={oui}|?{true,false})],
layersControl: [(#ENV{control_type,#ENV{controle_type}}|trim|=={non}|?{false,true})],
zoom: [(#ENV{zoom,#CONFIG{gis/zoom,0}}|strval|trim)][,
maxZoom: (#ENV{maxZoom}|strval|trim)][,
minZoom: (#ENV{minZoom}|strval|trim)][,
default_layer: '(#ENV{default_layer}|strval|trim)'][,
affiche_layers: (#ENV{affiche_layers}|strval|trim|?{[(#ENV{affiche_layers}|strval|trim|explode{/}|json_encode)],''})],
scrollWheelZoom: [(#ENV{zoom_molette,#ENV{zoom_wheel}}|strval|trim|=={non}|?{false,true})],
zoomControl: [(#ENV{no_control,#ENV{aucun_controle}}|strval|trim|!={oui}|?{true,false})],
fullscreenControl: [(#ENV{fullscreen}|strval|trim|=={oui}|?{true,false})],
scaleControl: [(#ENV{scale}|strval|trim|=={oui}|?{true,false})],
overviewControl:[(#ENV{overview}|strval|trim|=={oui}|?{true,false})],
layersControl: [(#ENV{control_type,#ENV{controle_type}}|strval|trim|=={non}|?{false,true})],
layersControlOptions: {
collapsed: [(#ENV{control_type_collapsed,#ENV{control_type_collapsed}}|trim|=={non}|?{false,true})]
collapsed: [(#ENV{control_type_collapsed,#ENV{control_type_collapsed}}|strval|trim|=={non}|?{false,true})]
},
noControl: [(#ENV{no_control,#ENV{aucun_controle}}|trim|=={oui}|?{true,false})],
noControl: [(#ENV{no_control,#ENV{aucun_controle}}|strval|trim|=={oui}|?{true,false})],
utiliser_bb: [(#GET{utiliser_bb}|?{true,false})][,
sw_lat: (#GET{sw_lat})][,
ne_lat: (#GET{ne_lat})][,
@ -128,12 +128,12 @@ var jQgisloader;
langue:'(#ENV{langue})'],
json_points:{
url: '[(#URL_PAGE{gis_json}|parametre_url{lang,#ENV{langue},&}|url_absolue)]'[,
objets: '(#ENV{objets,#ENV{class}}|trim)'],
limit: [(#ENV{limit,#ENV{limite,500}}|trim)],
objets: '(#ENV{objets,#ENV{class}}|strval|trim)'],
limit: [(#ENV{limit,#ENV{limite,500}}|strval|trim)],
env: [(#ENV*{args,#ENV*}|gis_modele_url_json_env|json_encode)][,
titre: (#ENV{titre}|?{#ENV{titre},''}|trim|json_encode)][,
description: (#ENV{description}|?{#ENV{description},''}|trim|json_encode)][,
icone: (#ENV{icone}|?{#ENV{icone},''}|trim|json_encode)]
titre: (#ENV{titre}|?{#ENV{titre},''}|strval|trim|json_encode)][,
description: (#ENV{description}|?{#ENV{description},''}|strval|trim|json_encode)][,
icone: (#ENV{icone}|?{#ENV{icone},''}|strval|trim|json_encode)]
},
tooltip: [(#ENV{tooltip}|=={oui}|?{true,false})],
cluster: [(#ENV{cluster}|=={oui}|?{true,false})],
@ -145,12 +145,12 @@ var jQgisloader;
singleMarkerMode: [(#ENV{singleMarkerMode}|?{true,false})]
},
pathStyles: [(#ENV*{path_styles}|json_encode)],
autocenterandzoom: [(#ENV{autocenterandzoom,#ENV{centrer_auto,non}}|trim|=={non}|?{false,true})],
autocenter: [(#ENV{autocenter,#ENV{centrer,non}}|trim|=={non}|?{false,true})],
autocenterandzoom: [(#ENV{autocenterandzoom,#ENV{centrer_auto,non}}|strval|trim|=={non}|?{false,true})],
autocenter: [(#ENV{autocenter,#ENV{centrer,non}}|strval|trim|=={non}|?{false,true})],
openId: [(#ENV{id_a_ouvrir,false})],
localize_visitor: [(#ENV{localize_visitor,#ENV{localiser_visiteur}}|trim|?{true,false})],
localize_visitor_zoom: [(#ENV{localize_visitor_zoom,#ENV{zoom,#CONFIG{gis/zoom,0}}}|trim)],
centrer_fichier: [(#ENV{centrer_fichier,oui}|trim|=={oui}|?{true,false})],
localize_visitor: [(#ENV{localize_visitor,#ENV{localiser_visiteur}}|strval|trim|?{true,false})],
localize_visitor_zoom: [(#ENV{localize_visitor_zoom,#ENV{zoom,#CONFIG{gis/zoom,0}}}|strval|trim)],
centrer_fichier: [(#ENV{centrer_fichier,oui}|strval|trim|=={oui}|?{true,false})],
kml: [(#ENV{kml,''}|?{[(#ENV{kml}|gis_param_to_array|gis_kml_to_urls|json_encode)],false})],
gpx: [(#ENV{gpx,''}|?{[(#ENV{gpx}|gis_param_to_array|gis_kml_to_urls|json_encode)],false})],
geojson: [(#ENV{geojson,''}|?{[(#ENV{geojson}|gis_param_to_array|gis_kml_to_urls|json_encode)],false})],

Loading…
Cancel
Save