This was initially introduced with https://github.com/php/php-src/commit/9f86cdaf7fc4
However, this should also have been done for the opendir call.
This omission was found via OSS-Fuzz 51047 [1]
and fixed in a more general way in d0b3096ff0
by resetting `FG(user_stream_current_filename)` at the end of the request during shutdown.
As such this zend_try/zend_catch block is now unnecessary.
[1]: https://issues.oss-fuzz.com/issues/42515581