diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 336748d0c03..31fbc0ee4b3 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -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 diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index c63ace353b3..371d687b9b7 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -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