ezp-21977 fixed error compatibility with closure and php5.3