Thanks @madgen, good catch, and thanks for the fix.
I’ve confirmed it in the current 17.0 code (`Allowlist.class.php`, `doConfigPageInit()`). When “== choose one ==” is selected, `goto0` is posted empty, so the code looks up `$request[‘0’]`, which doesn’t exist. PHP 8 warns about the missing key and FreePBX shows the Whoops page.
Your `?? ‘’` fixes that case. There’s a second one: if `goto0` isn’t posted at all, `$destination` is never set before `destinationSet($destination)` is called. This version covers both:
```php
$destination = ‘’;
if (isset($request[‘goto0’]))
{
$destination = $request\[$request\['goto0'\] . '0'\] ?? '';
}
```
About callers going to blackhole after the fix: that comes from the fix working. Choosing “== choose one ==” now saves “no destination” and deletes the old one. With no destination set, the dialplan falls back to `app-blackhole,hangup,1`, so callers who aren’t on the list are hung up on. Before, the error stopped the save, so the old destination survived by accident. I’ll either require a destination or keep the existing one when none is picked, so that can’t happen silently.
**Multiple allowlists:** agreed, and it’s planned. Rough scope:
- Named lists, with current entries moved into a `default` list on upgrade so nothing changes for existing setups
- Each inbound route chooses which list to check
- Each outbound route with auto-add chooses which list to add to
- Optional destination per list, falling back to the global one
- Feature codes, `fwconsole allowlist`, the API, bulk import/export and backup/restore all made aware of lists
If you have opinions on any of these, please share:
1. Should a caller on *any* list get through, or only one on the list chosen for that inbound route?
2. How should the feature codes (*38–*40) pick a list: one code per list, or always the default list?
3. Should pause stay global or apply to each list?
I’ve also been through the rest of the 17.0 code and found several other bugs. Fixes for those will come along with this one.