1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

Miglioramento del codice

Utilizzo della funzione str_contains al posto dei singoli strpos per semplificare i controlli sui contenuti delle stringhe.
This commit is contained in:
Thomas Zilio
2017-08-28 15:29:03 +02:00
parent 2d6d54d940
commit e25e609d80
21 changed files with 43 additions and 42 deletions

View File

@@ -44,7 +44,7 @@ class Settings
$result = $results[0];
$value = $result['valore'];
if (!empty($descrizione) && strpos($result['tipo'], 'query=') !== false) {
if (!empty($descrizione) && str_contains($result['tipo'], 'query=')) {
$data = $database->fetchArray(str_replace('query=', '', $result['tipo']));
if (!empty($data)) {
$value = $data[0]['descrizione'];