A class of optimal control problem for a semilinear elliptic partial differential equation with control constraints is considered. It is well known that sufficient second-order conditions ensure the stability of optimal solutions, the convergence of numerical methods. Otherwise, such conditions are very difficult to verify (analytically or numerically). We will propose a new approach: Starting with a numerical solution for a fixed mesh we will show the existence of a local minimizer of the continuous problem. Moreover, we will prove that this minimizer satisfies the sufficient second-order conditions.