Update BaseProvider.php

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