wordpress illegal string offset ‘parameter’ error

Checkboxes only send data when checked. When unchecked, there is no post (or get) data. You need to check if set using isset()

if (isset($_POST['custom_settings']['checked'])) { /* it was ticked */ }

error code: 523