move function declaration

This commit is contained in:
Frédéric FRANCE 2021-03-15 11:20:15 +01:00
parent 15c751ae89
commit 29d86adcb3
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
2 changed files with 11 additions and 12 deletions

View File

@ -49,18 +49,6 @@ if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) {
}
}
if (!function_exists('is_countable')) {
/**
* function is_countable (to remove when php version supported will be >= 7.3)
* @param mixed $c data to check if countable
* @return bool
*/
function is_countable($c)
{
return is_array($c) || $c instanceof Countable;
}
}
/**
* Security: WAF layer for SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF).
* Warning: Such a protection can't be enough. It is not reliable as it will alwyas be possible to bypass this. Good protection can

View File

@ -35,6 +35,17 @@
require_once 'filefunc.inc.php'; // May have been already require by main.inc.php. But may not by scripts.
if (!function_exists('is_countable')) {
/**
* function is_countable (to remove when php version supported will be >= 7.3)
* @param mixed $c data to check if countable
* @return bool
*/
function is_countable($c)
{
return is_array($c) || $c instanceof Countable;
}
}
/*
* Create $conf object