]> granicus.if.org Git - php/commitdiff
Fix Bug #71089 No check to duplicate zend_extension
authorRemi Collet <remi@php.net>
Fri, 11 Dec 2015 12:21:24 +0000 (13:21 +0100)
committerRemi Collet <remi@php.net>
Fri, 11 Dec 2015 12:21:24 +0000 (13:21 +0100)
Zend/zend_extensions.c

index 8321f1ce83181fa2e99043e8904c4bce7ef9065e..fbf1f327a6c34417a206cfc0539094c8d5696208 100644 (file)
@@ -100,6 +100,14 @@ int zend_load_extension(const char *path)
                fprintf(stderr, "Cannot load %s - it was built with configuration %s, whereas running engine is %s\n",
                                        new_extension->name, extension_version_info->build_id, ZEND_EXTENSION_BUILD_ID);
 /* See http://support.microsoft.com/kb/190351 */
+#ifdef PHP_WIN32
+               fflush(stderr);
+#endif
+               DL_UNLOAD(handle);
+               return FAILURE;
+       } else if (zend_get_extension(new_extension->name)) {
+               fprintf(stderr, "Cannot load %s - extension already loaded\n", new_extension->name);
+/* See http://support.microsoft.com/kb/190351 */
 #ifdef PHP_WIN32
                fflush(stderr);
 #endif