Fix "Line:"598" => Invalid argument supplied for foreach()"