The light rays from a source are subject to a local inhomogeneous geometry generated by inhomogeneous matter distribution as well as the existence of collapsed objects . In this paper we investigate the effect of inhomogeneities and the existence of collapsed objects on the propagation of light rays and evaluate changes in the magnitude-redshift relation from the standard relationship found in a homogeneous FRW universe . We give the expression of the correlation function and the variance for the perturbation of apparent magnitude , and calculate it numerically by using the non-linear matter power spectrum . We use the lognormal probability distribution function for the density contrast and spherical collapse model to truncate the power spectrum in order to estimate the blocking effect by collapsed objects . We find that the uncertainties in \Omega _ { m } is \sim 0.02 , and that of w is \sim 0.04 . We also discuss a possible method to extract these effects from real data which contains intrinsic ambiguities associated with the absolute magnitude .