Fixed php error in IsEmpty method