1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-23 22:03:18 +01:00

Fix parziali PHP 8.1

This commit is contained in:
Luca 2022-02-04 19:52:09 +01:00
parent d3b42eacfc
commit a66ef457b8
4 changed files with 7 additions and 5 deletions

View File

@ -15,7 +15,7 @@
}],
"type": "project",
"require": {
"php": ">=5.6.4",
"php": ">=7.1",
"ext-curl": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
@ -29,7 +29,7 @@
"ext-xsl": "*",
"ext-zip": "*",
"aluguest/ical-easy-reader": "^1.5",
"danielstjules/stringy": "^3.1",
"voku/stringy": "~6.0",
"davidepastore/codice-fiscale": "^0.6.0",
"dragonmantank/cron-expression": "^1.0",
"ezyang/htmlpurifier": "^4.8",

View File

@ -24,7 +24,7 @@ header_remove('X-Powered-By');
date_default_timezone_set('Europe/Rome');
// Controllo sulla versione PHP
$minimum = '5.6.0';
$minimum = '7.1.0';
if (version_compare(phpversion(), $minimum) < 0) {
echo '
<p>Stai utilizzando la versione PHP '.phpversion().', non compatibile con OpenSTAManager.</p>

View File

@ -18,7 +18,7 @@
*/
use Util\FileSystem;
$lang = '';
include_once __DIR__.'/../core.php';
$paths = App::getPaths();

View File

@ -485,7 +485,9 @@ class HTMLBuilder
$attributes = [];
foreach ($values as $key => $value) {
// Fix per la presenza di apici doppi
if (!empty($value)){
$value = prepareToField(is_array($value) ? implode(' ', $value) : $value);
}
if (string_contains($result, '|'.$key.'|')) {
$result = str_replace('|'.$key.'|', $value, $result);
} elseif (!empty($value) || is_numeric($value)) {