fix php 5.3.x compatibility when validate parameters in closure