Fix PHP Error "Invalid argument supplied for foreach()"

Bug: 43965
Change-Id: I4b2d7847acabf144a5d2e093720477517264e691