Mechanic & welder were in the JLG man basket removing a leveling cylinder pin. Welder was repositioning the basket the machine was shut off & the boom started to settle resulting in the arm sliding forward. As the boom lowered it pinned the mechanic between the upper bucket & the back railing of the man basket resulting in an injury to the mech left ear. Seen at ER received sutures