fix RequestHandlerFactory bug on php 5.4+