From 5bc20307173a74bb7e740874ea2ef9cc60f04036 Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Fri, 16 Sep 2005 21:05:36 +0000
Subject: [PATCH] eviter de boucler sur des while(preg_match) quand on peut
 utiliser preg_match_all

---
 inc-html-squel.php3 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inc-html-squel.php3 b/inc-html-squel.php3
index 3cd6cf5980..93124e93c7 100644
--- a/inc-html-squel.php3
+++ b/inc-html-squel.php3
@@ -77,7 +77,8 @@ function phraser_inclure($texte, $ligne, $result) {
 
 function phraser_polyglotte($texte,$ligne, $result) {
 
-  while (preg_match("@<multi>(.*?)</multi>@s", $texte, $match)) {
+	if (preg_match_all(",<multi>(.*)</multi>,Uims", $texte, $m, PREG_SET_ORDER))
+	foreach ($m as $match) {
 		$p = strpos($texte, $match[0]);
 		$debut = substr($texte, 0, $p);
 		if ($p) {
-- 
GitLab