Fix PHP 7.3 compatibility
This commit is contained in:
parent
66b94fb7d6
commit
8ff2fe663d
9 changed files with 21 additions and 21 deletions
|
@ -24,7 +24,7 @@
|
||||||
"sepia/po-parser": "^6.0",
|
"sepia/po-parser": "^6.0",
|
||||||
"sentry/sdk": "^3.3",
|
"sentry/sdk": "^3.3",
|
||||||
"ext-pdo": "^7.3",
|
"ext-pdo": "^7.3",
|
||||||
"ext-json": "^7.3",
|
"ext-json": "^1.7",
|
||||||
"ext-yaml": "^2.0",
|
"ext-yaml": "^2.0",
|
||||||
"league/mime-type-detection": "^1.11"
|
"league/mime-type-detection": "^1.11"
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,14 +9,14 @@ class Date {
|
||||||
* @see strftime()
|
* @see strftime()
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public static string $date_format = "%d/%m/%Y";
|
public static $date_format = "%d/%m/%Y";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The datetime format
|
* The datetime format
|
||||||
* @see strftime()
|
* @see strftime()
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public static string $date_time_format = "%d/%m/%Y %H:%M:%S";
|
public static $date_time_format = "%d/%m/%Y %H:%M:%S";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format a timestamp as date/datetime string
|
* Format a timestamp as date/datetime string
|
||||||
|
|
|
@ -24,13 +24,13 @@ class Db {
|
||||||
* Date format as returned by database
|
* Date format as returned by database
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected string $date_format = '%Y-%m-%d';
|
protected $date_format = '%Y-%m-%d';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Datetime format as returned by database
|
* Datetime format as returned by database
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected string $datetime_format = '%Y-%m-%d %H:%M:%S';
|
protected $datetime_format = '%Y-%m-%d %H:%M:%S';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Locale for time (as expected by LC_TIME)
|
* Locale for time (as expected by LC_TIME)
|
||||||
|
|
|
@ -15,19 +15,19 @@ class I18n {
|
||||||
* The core root directory path of translation files
|
* The core root directory path of translation files
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected static string $core_root_path = __DIR__.'/../locales';
|
protected static $core_root_path = __DIR__.'/../locales';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The root directory path of translation files
|
* The root directory path of translation files
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected static string $root_path = 'locales';
|
protected static $root_path = 'locales';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default locale
|
* The default locale
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected static string $default_locale = 'en_US.UTF8';
|
protected static $default_locale = 'en_US.UTF8';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize translation system
|
* Initialize translation system
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Log {
|
||||||
* Default log level
|
* Default log level
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected static string $default_level = 'WARNING';
|
protected static $default_level = 'WARNING';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Current log level
|
* Current log level
|
||||||
|
|
|
@ -18,7 +18,7 @@ class SentryIntegration {
|
||||||
* @see https://www.php.net/manual/fr/errorfunc.constants.php
|
* @see https://www.php.net/manual/fr/errorfunc.constants.php
|
||||||
* @var array<int>
|
* @var array<int>
|
||||||
*/
|
*/
|
||||||
protected static array $php_error_types = array(
|
protected static $php_error_types = array(
|
||||||
E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR,
|
E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR,
|
||||||
E_RECOVERABLE_ERROR,E_DEPRECATED,
|
E_RECOVERABLE_ERROR,E_DEPRECATED,
|
||||||
);
|
);
|
||||||
|
|
|
@ -11,7 +11,7 @@ class Session {
|
||||||
* Session max duration (in seconds, default: 12h)
|
* Session max duration (in seconds, default: 12h)
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
protected static int $max_duration = 12 * 60 * 60;
|
protected static $max_duration = 12 * 60 * 60;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialization
|
* Initialization
|
||||||
|
|
18
src/Tpl.php
18
src/Tpl.php
|
@ -13,7 +13,7 @@ class Tpl {
|
||||||
* Smarty object
|
* Smarty object
|
||||||
* @var \Smarty
|
* @var \Smarty
|
||||||
*/
|
*/
|
||||||
public static Smarty $smarty;
|
public static $smarty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty_Security object
|
* Smarty_Security object
|
||||||
|
@ -25,25 +25,25 @@ class Tpl {
|
||||||
* Core Smarty templates directory
|
* Core Smarty templates directory
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public static string $core_templates_directory;
|
public static $core_templates_directory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty templates directories path with their priority
|
* Smarty templates directories path with their priority
|
||||||
* @var array<string,int>
|
* @var array<string,int>
|
||||||
*/
|
*/
|
||||||
public static array $templates_directories = array();
|
public static $templates_directories = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Smarty cache templates directory path
|
* Smarty cache templates directory path
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public static string $templates_c_dir;
|
public static $templates_c_dir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable AJAX returned data debugging in logs
|
* Enable/disable AJAX returned data debugging in logs
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
public static bool $_debug_ajax;
|
public static $_debug_ajax;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core static directory
|
* Core static directory
|
||||||
|
@ -55,19 +55,19 @@ class Tpl {
|
||||||
* Static directories path with their priority
|
* Static directories path with their priority
|
||||||
* @var array<string,array>
|
* @var array<string,array>
|
||||||
*/
|
*/
|
||||||
private static array $static_directories = array();
|
private static $static_directories = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CSS files to load in next displayed page
|
* CSS files to load in next displayed page
|
||||||
* @var array<string>
|
* @var array<string>
|
||||||
*/
|
*/
|
||||||
private static array $css_files = array();
|
private static $css_files = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JavaScript files to load in next displayed page
|
* JavaScript files to load in next displayed page
|
||||||
* @var array<string>
|
* @var array<string>
|
||||||
*/
|
*/
|
||||||
private static array $js_files = array();
|
private static $js_files = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MIME type detector object
|
* MIME type detector object
|
||||||
|
@ -508,7 +508,7 @@ class Tpl {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function initialized() {
|
public static function initialized() {
|
||||||
return isset(self :: $smarty);
|
return self :: $smarty instanceof Smarty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Url {
|
||||||
* @see self :: initialization()
|
* @see self :: initialization()
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected static bool $_api_mode;
|
protected static $_api_mode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialization
|
* Initialization
|
||||||
|
|
Loading…
Reference in a new issue