From fb5e694ef7a6c9dc56e2b1caeab0e9021cdc311e Mon Sep 17 00:00:00 2001 From: Koji Tanaka Date: Sat, 7 Jan 2023 21:48:33 +0900 Subject: [PATCH] fix: The get_magic_quotes_gpc function was removed in PHP 8.0, so check before calling it. --- lib/Cake/View/Helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/View/Helper.php b/lib/Cake/View/Helper.php index f8bdd2dd3..98080a3bf 100644 --- a/lib/Cake/View/Helper.php +++ b/lib/Cake/View/Helper.php @@ -958,7 +958,7 @@ class Helper extends CakeObject { * @return void */ protected function _clean() { - if (get_magic_quotes_gpc()) { + if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { $this->_cleaned = stripslashes($this->_tainted); } else { $this->_cleaned = $this->_tainted;