Ticket #256: check-extension-is-null

File check-extension-is-null, 410 bytes (added by nijel, 4 years ago)

Patch fixing this

Line 
1--- php5-xcache-1.3.1.orig/xcache.c
2+++ php5-xcache-1.3.1/xcache.c
3@@ -2965,10 +2965,12 @@
4 
5    if (xc_zend_extension_faked) {
6        zend_extension *ext = zend_get_extension(XCACHE_NAME);
7-       if (ext->shutdown) {
8-           ext->shutdown(ext);
9+       if (ext) {
10+           if (ext->shutdown) {
11+               ext->shutdown(ext);
12+           }
13+           xc_zend_remove_extension(ext);
14        }
15-       xc_zend_remove_extension(ext);
16    }
17    UNREGISTER_INI_ENTRIES();
18