Fixed 2 PHP issues I had with my installtion

Basic stuff. One strict standards fix and one check before foreach runs.