diff --git a/composer.json b/composer.json index 2cc3efd08..ddcd35028 100755 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/core.php b/core.php index 004664e5f..c22580eda 100755 --- a/core.php +++ b/core.php @@ -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 '
Stai utilizzando la versione PHP '.phpversion().', non compatibile con OpenSTAManager.
diff --git a/include/top.php b/include/top.php index c917295c4..cf05f54bd 100755 --- a/include/top.php +++ b/include/top.php @@ -18,7 +18,7 @@ */ use Util\FileSystem; - +$lang = ''; include_once __DIR__.'/../core.php'; $paths = App::getPaths(); diff --git a/src/HTMLBuilder/HTMLBuilder.php b/src/HTMLBuilder/HTMLBuilder.php index 027a8442f..8dfe92a60 100755 --- a/src/HTMLBuilder/HTMLBuilder.php +++ b/src/HTMLBuilder/HTMLBuilder.php @@ -485,7 +485,9 @@ class HTMLBuilder $attributes = []; foreach ($values as $key => $value) { // Fix per la presenza di apici doppi - $value = prepareToField(is_array($value) ? implode(' ', $value) : $value); + 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)) {