Characterizing current fluctuations in a steady state is of fundamental interest and has attracted considerable attention in the recent past. However, the bulk of the studies are limited to systems that either do not exhibit a phase transition or are far from criticality. Here we consider a symmetric zero-range process on a ring that is known to show a phase transition in the steady state. We analytically calculate two density-dependent transport coefficients, namely, the bulk-diffusion coefficient and the particle mobility, that characterize the first two cumulants of the time-integrated current. We show that on the hydrodynamic scale, away from the critical point, the variance of the time-integrated current in the steady state grows with time t as sqrt[t] and t at short and long times, respectively. Moreover, we find an expression of the full scaling function for the variance of the time-integrated current and thereby the amplitude of the temporal growth of the current fluctuations. At the critical point, using a scaling theory, we find that, while the above-mentioned long-time scaling of the variance of the cumulative current continues to hold, the short-time behavior is anomalous in that the growth exponent is larger than one-half and varies continuously with the model parameters.