Update BaseProvider.php

fix glob return is false
 Invalid argument supplied for foreach()