© 2019 SPIE. Phase unwrapping is an essential step for 3D shape measurement based on fringe projection. Temporal phase unwrapping methods can be implemented by analyzing the multiple patterns that encode the fringe order information. They can retrieve the fringe orders on a pixel-by-pixel basis and are less prone to error propagation compared with spatial methods. However, fringe orders errors may still occur due to noise, reflectivity fluctuation and discontinuity of the object surface. Such errors may exhibit an impulsive nature and result in significant error to the recovered absolute phase map. This has been exploited by several methods to correct the fringe order errors, e.g., by filtering the fringe order sequences in a line-by-line manner. In this paper, a new method is proposed to correct the errors associated with fringe orders for the temporal phase unwrapping. The scheme first makes use of the low-rankness property of the fringe order map and sparse nature of the impulsive fringe order errors to more effectively remove the impulsive errors by applying robust principal component analysis (RPCA) algorithm. Then the smoothness of the two-dimensional unwrapped phase map is examined and the residual fringe order errors are detected based on a discontinuity measure of the phase map and corrected by comparing phase difference between two adjacent pixels in the unwrapped phase. The effectiveness of the proposed method is demonstrated via numerical experiments.