File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 9090if ($ _POST ['m ' ] == 'openAppStarrAccess ' ) {
9191 $ existing = $ proxyDb ->getAppFromId ($ _POST ['id ' ], $ appsTable );
9292 $ existing ['endpoints ' ] = $ existing ['endpoints ' ] ? json_decode ($ existing ['endpoints ' ], true ) : [];
93- $ existing ['redactions ' ] = $ existing ['redactions ' ] ? array_filter (explode (', ' , $ existing ['redactions ' ])) : [];
93+ $ existing ['redactions ' ] = trim ( $ existing ['redactions ' ]) ? array_filter (explode (', ' , $ existing ['redactions ' ])) : [];
9494 $ clone = isset ($ _POST ['clone ' ]) ? $ proxyDb ->getAppFromId ($ _POST ['clone ' ], $ appsTable ) : [];
9595 $ endpoints = $ starr ->getEndpoints ($ app );
9696 $ redactedOptions = array_filter (explode (', ' , $ settingsTable ['redactionFields ' ]));
143143 <?php
144144 foreach ($ redactedOptions as $ redactedOption ) {
145145 $ redactedOption = trim ($ redactedOption );
146- ?> <option <?= in_array ($ redactedOption , $ existing ['redactions ' ]) ? 'selected ' : '' ?> value="<?= $ redactedOption ?> "><?= $ redactedOption ?> </option><?php
146+ ?> <option <?= ! empty ( $ existing [ ' redactions ' ]) && in_array ($ redactedOption , $ existing ['redactions ' ]) ? 'selected ' : '' ?> value="<?= $ redactedOption ?> "><?= $ redactedOption ?> </option><?php
147147 }
148148 ?>
149149 </select>
You can’t perform that action at this time.
0 commit comments