From 29d86adcb3659a06bed0da6808a01009f0170e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 15 Mar 2021 11:20:15 +0100 Subject: [PATCH] move function declaration --- htdocs/main.inc.php | 12 ------------ htdocs/master.inc.php | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) 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