From 79cea8067babf18f03819a8b5f7229d28fd2fce1 Mon Sep 17 00:00:00 2001 From: Cerdic Date: Thu, 29 Sep 2022 16:40:39 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20`create=5Freplace`=20n'est=20plus=20un?= =?UTF-8?q?=20type=20de=20r=C3=A8gle=20support=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: #4836 --- engine/textwheel.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/engine/textwheel.php b/engine/textwheel.php index 68adcbc..68ec47a 100644 --- a/engine/textwheel.php +++ b/engine/textwheel.php @@ -215,15 +215,9 @@ class TextWheel { } if ($rule->create_replace) { - // DEPRECATED : rule->create_replace, on ne peut rien faire de mieux ici - // mais c'est voue a disparaitre - $compile = $rule->replace . '($t)'; - $rule->replace = function ($m) use ($rule) { - eval($rule->replace); - }; - $this->compiled[$this->ruleCompiledEntryName($rule->replace)] = $compile; - $rule->create_replace = false; - $rule->is_callback = true; + // FORBIDDEN : rule->create_replace n'est plus supportée + $rule->disabled = true; + throw new Exception('Les règles de type create_replace ne sont plus autorisée (Règle '.($rule->name ?? '' . ' / ' . $rule->replace).')'); } elseif ($rule->is_wheel) { $rule_number = count(TextWheel::$subwheel);