Fix array access error in PHP <= 5.3.28