Can you add a check for 
if (!is_array($config['installedpackages']['snortglobal']))