I'm on Moodle 3.5.2
I'm creating a local plugin and i'm trying to add a settings page to display a list of categories that will be used in my plugin. I've written the code below and it lives in local/catalogue/settings.php
I keep getting an error "Exception - Call to a member function add() on null" and I don't know what this means. I can't see what i'm doing wrong with my $settings variable for it to not work.