A search for flavor-changing neutral currents in top-quark decays t → Zq is performed in events produced from the decay chain tt → Zq+Wb, where both vector bosons decay leptonically, producing a final state with three leptons (electrons or muons). A data set collected with the CMS detector at the LHC is used, corresponding to an integrated luminosity of 19.7 fb(-1) of proton-proton collisions at a center-of-mass energy of 8 TeV. No excess is seen in the observed number of events relative to the standard model prediction; thus, no evidence for flavor-changing neutral currents in top-quark decays is found. A combination with a previous search at 7 TeV excludes a t → Zq branching fraction greater than 0.05% at the 95% confidence level.