From 0ab48c7129d78f5b3c18a2309e4cfb4b529bb1fd Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Sun, 15 Sep 2019 09:59:03 +0200
Subject: [PATCH] perf issue : eviter d'inclure plein de fichier quand on
 appelle _T() sans argument

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

diff --git a/ecrire/inc/utils.php b/ecrire/inc/utils.php
index e786a3aaa6..7be7c984e9 100644
--- a/ecrire/inc/utils.php
+++ b/ecrire/inc/utils.php
@@ -839,7 +839,7 @@ function _L($text, $args = array(), $options = array()) {
 		$options = $defaut_options;
 	}
 
-	if (is_array($args)) {
+	if (is_array($args) and count($args)) {
 		if (!function_exists('interdire_scripts')) {
 			include_spip('inc/texte');
 		}
-- 
GitLab