]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorRemi Collet <remi@php.net>
Fri, 11 Dec 2015 12:22:55 +0000 (13:22 +0100)
committerRemi Collet <remi@php.net>
Fri, 11 Dec 2015 12:22:55 +0000 (13:22 +0100)
* PHP-5.6:
  NEWS
  Fix Bug #71089 No check to duplicate zend_extension

1  2 
Zend/zend_extensions.c

index bec776e68c8740677dfd38d52c247358abf5d9e7,fbf1f327a6c34417a206cfc0539094c8d5696208..399186a45d33681cba5c763011309cc5b1bbeb3d
@@@ -99,16 -100,16 +99,24 @@@ int zend_load_extension(const char *pat
                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
 +#ifdef ZEND_WIN32
 +              fflush(stderr);
 +#endif
 +              DL_UNLOAD(handle);
 +              return FAILURE;
 +      } else if (zend_get_extension(new_extension->name)) {
 +              fprintf(stderr, "Cannot load %s - it was already loaded\n", new_extension->name);
 +/* See http://support.microsoft.com/kb/190351 */
 +#ifdef ZEND_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
                DL_UNLOAD(handle);
                return FAILURE;