From 959502e08ee8cad5a370e34aaa05fad223de3509 Mon Sep 17 00:00:00 2001
From: Matthieu Marcillaud <marcimat@rezo.net>
Date: Wed, 23 Feb 2022 14:14:03 +0100
Subject: [PATCH] =?UTF-8?q?Warning=20en=20moins=20dans=20generer=5Furl=5Fe?=
 =?UTF-8?q?crire,=20depuis=20generer=5Furl=5Faction=20si=20pas=20de=20exec?=
 =?UTF-8?q?=20dans=20l=E2=80=99url?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/inc/utils.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index fb8309844b..357002bdc6 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -2196,7 +2196,8 @@ function url_de_($http, $host, $request, $prof = 0) {
  *     - string : on transmet l'url à la fonction
  * @return string URL
  **/
-function generer_url_ecrire($script = '', $args = '', $no_entities = false, $rel = false) {
+function generer_url_ecrire(?string $script = '', $args = '', $no_entities = false, $rel = false) {
+	$script ??= '';
 	if (!$rel) {
 		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
 	} else {
-- 
GitLab