Add better array checking in BaseScanner

Get PHP warnings in various spots when these vars aren’t arrays