fixes php warning for invalid array