Prevent Warning: Invalid argument supplied for foreach() in system.inc

Captive code doesn't check for existance of variable before using it!