fix: The get_magic_quotes_gpc function was removed in PHP 8.0, so check before calling it.

This commit is contained in:
Koji Tanaka 2023-01-07 21:48:33 +09:00 committed by Kamil Wylegala
parent cbf4682ad5
commit fb5e694ef7

View file

@ -958,7 +958,7 @@ class Helper extends CakeObject {
* @return void * @return void
*/ */
protected function _clean() { protected function _clean() {
if (get_magic_quotes_gpc()) { if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$this->_cleaned = stripslashes($this->_tainted); $this->_cleaned = stripslashes($this->_tainted);
} else { } else {
$this->_cleaned = $this->_tainted; $this->_cleaned = $this->_tainted;