diff --git a/conf/config.inc.php b/conf/config.inc.php index 322d04e..4f9b705 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -218,7 +218,7 @@ # Smarty if (!defined("SMARTY")) { - define("SMARTY", "/usr/share/php/smarty3/Smarty.class.php"); + define("SMARTY", "/usr/share/php/smarty4/Smarty.class.php"); } # Allow to override current settings with an extra configuration file, whose reference is passed in HTTP_HEADER $header_name_extra_config diff --git a/docs/general-parameters.rst b/docs/general-parameters.rst index 9a52454..d411795 100644 --- a/docs/general-parameters.rst +++ b/docs/general-parameters.rst @@ -172,7 +172,7 @@ You need to define where Smarty is installed: .. code-block:: php - define("SMARTY", "/usr/share/php/smarty3/Smarty.class.php"); + define("SMARTY", "/usr/share/php/smarty4/Smarty.class.php"); Notify administrator by mail ---------------------------- diff --git a/docs/installation.rst b/docs/installation.rst index 23caadc..0bf2b2d 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -21,7 +21,7 @@ You need to install these prerequisites: * Apache or another web server * php * php-ldap -* Smarty (version 3) +* Smarty (version 4) Debian / Ubuntu --------------- @@ -54,14 +54,14 @@ You are now ready to install: .. prompt:: bash # - apt install service-desk smarty3 + apt install service-desk smarty4 CentOS / RedHat --------------- -.. warning:: You may need to install first the package `php-Smarty`_ which is not in official repositories. +.. warning:: You may need to install first the package `smarty4` which is not in official repositories. -.. _php-Smarty: https://pkgs.org/download/php-Smarty +.. _smarty4: https://pkgs.org/download/smarty4 Configure the yum repository: diff --git a/htdocs/display.php b/htdocs/display.php index fd53aad..7e9ba15 100644 --- a/htdocs/display.php +++ b/htdocs/display.php @@ -126,7 +126,7 @@ } # Lock - $pwdLockout = strtolower($ppolicy_entry[0]['pwdlockout'][0]) == "true" ? true : false; + $pwdLockout = strtolower(isset($ppolicy_entry[0]['pwdlockout'][0])) == "true" ? true : false; $pwdLockoutDuration = $ppolicy_entry[0]['pwdlockoutduration'][0]; $pwdAccountLockedTime = $entry[0]['pwdaccountlockedtime'][0]; diff --git a/htdocs/index.php b/htdocs/index.php index 66d8985..b5aed89 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -82,6 +82,9 @@ $smarty->setCacheDir($cache_dir); $smarty->debugging = $smarty_debug; +# Muting warnings due to PHP 8+ +$smarty->muteUndefinedOrNullWarnings(); + error_reporting(0); if ($debug) { error_reporting(E_ALL);