# stream_get_meta_data is missing filters

- Thread: https://externals.io/message/57168
- Original archive: https://news-web.php.net/php.internals/57168
- Started by mtdowling@gmail.com on 2012-01-02T21:33:12+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #57168 — mtdowling@gmail.com — 2012-01-02T21:33:12+00:00

URL: https://externals.io/message/57168#57168

The docs state that the return value of the stream_get_meta_data function  
will contain a 'filters' key which contains an array of filters registered  
on a stream. I noticed that the 'filters' array wasn't being returned, so I  
took a look at the source. It looks like this is a known issue because  
the 'filters' code is commented out (in 5.3 trunk and 5.4):

#if 0 /* TODO: needs updating for new filter API */
if (stream->filterhead) {
php_stream_filter *filter;

MAKE_STD_ZVAL(newval);
array_init(newval);

for (filter = stream->filterhead; filter != NULL; filter = filter->next) {
add_next_index_string(newval, (char *)filter->fops->label, 1);
}

add_assoc_zval(return_value, "filters", newval);
}
#endif

Does anyone know the status on updating this method for the new filter API?  
I don't see an open bug report, so I'd be happy to open one if needed.

Thanks,
Michael
