# [PATCH] dl() and shutdown, revisited

- Thread: https://externals.io/message/16397
- Original archive: https://news-web.php.net/php.internals/16397
- Started by Wez Furlong on 2005-06-06T02:04:22+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

---

## #16397 — Wez Furlong — 2005-06-06T02:04:22+00:00

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

I just spent the last hour or so tracking down a couple of mysterious
'ht is already destroyed' messages.

It turns out that this is caused by zend_clean_module_rsrc_dtors_cb()
attempting to apply a callback function to the regular and persistent
lists.  At the time this is called, those lists have already been
destroyed.

The attached patch is something of a hack to avoid bailing out in this
case.  There might be a better way to handle this.

The problem only occurs with `dl()`'d modules that register resources.
