Commit 19f25461 authored by Sigrid Suski's avatar Sigrid Suski

(#) FILTER_SANITIZE_ADD_SLASHES does not work for PHP versions below 7.4

parent 3e9b4e4d
......@@ -44,5 +44,5 @@ abstract class C
const NO = 0;
const ROOT = JPATH_ROOT;
const DS = DIRECTORY_SEPARATOR;
const VERSION = '1.0.12';
const VERSION = '1.0.13';
}
......@@ -234,7 +234,12 @@ abstract class Input
{
$value = Request::Instance()->{$request}->getString( $name, $default );
return filter_var( $value, FILTER_SANITIZE_ADD_SLASHES );
if ( version_compare( PHP_VERSION, '7.4.0' ) >= 0 ) {
return filter_var( $value, FILTER_SANITIZE_ADD_SLASHES );
}
else {
return filter_var( $value, FILTER_SANITIZE_MAGIC_QUOTES );
}
}
/**
......
......@@ -31,11 +31,13 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
(!) Change
### 1.0.13 (31 Juli 2020)
### 1.0.13 (05 June 2020)
(+) Output of error messages added
(+) CURL initialisation error added
(#) FILTER_SANITIZE_ADD_SLASHES does not work for PHP versions below 7.4
### 1.0.12 (30 May 2020)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment