Sfoglia il codice sorgente

fix option value if not set

CauseFX 4 anni fa
parent
commit
25cdfa70cf
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      api/functions/option-functions.php

+ 1 - 1
api/functions/option-functions.php

@@ -20,7 +20,7 @@ trait OptionsFunction
 		$type = strtolower(str_replace('-', '', $type));
 		$type = strtolower(str_replace('-', '', $type));
 		$setting = [
 		$setting = [
 			'name' => $name,
 			'name' => $name,
-			'value' => $this->config[$name]
+			'value' => $this->config[$name] ?? ''
 		];
 		];
 		switch ($type) {
 		switch ($type) {
 			case 'enable':
 			case 'enable':