We report on neutron-scattering results on the impact of a magnetic field on stripe order in the cuprate La$_{1.875}$Ba$_{0.125}$CuO$_4$. It is found that a 7 T magnetic field applied along the {it c} axis causes a small but finite enhancement of the spin-order peak intensity and has no observable effect on the peak width. Inelastic neutron-scattering measurements indicate that the low-energy magnetic excitations are not affected by the field, within experimental error. In particular, the small energy gap that was recently reported is still present at low temperature in the applied field. In addition, we find that the spin-correlation length along the antiferromagnetic stripes is greater than that perpendicular to them.