]> granicus.if.org Git - php/commitdiff
fix plugin counting, this is trunk only
authorAndrey Hristov <andrey@php.net>
Fri, 25 Feb 2011 16:44:39 +0000 (16:44 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 25 Feb 2011 16:44:39 +0000 (16:44 +0000)
ext/mysqlnd/mysqlnd_plugin.c

index 97e1bada29c026be6ec4df93cfdbb9165a67fbd8..96ba9b68b342b64ffc5d07f6becb106eb6ea5b89 100644 (file)
@@ -148,14 +148,13 @@ PHPAPI unsigned int mysqlnd_plugin_register_ex(struct st_mysqlnd_plugin_header *
        if (plugin) {
                if (plugin->plugin_api_version == MYSQLND_PLUGIN_API_VERSION) {
                        zend_hash_update(&mysqlnd_registered_plugins, plugin->plugin_name, strlen(plugin->plugin_name) + 1, &plugin, sizeof(void *), NULL);
-                       ++mysqlnd_plugins_counter;
+                       return mysqlnd_plugins_counter++;
                } else {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Plugin API version mismatch while loading plugin %s. Expected %d, got %d",
                                                        plugin->plugin_name, MYSQLND_PLUGIN_API_VERSION, plugin->plugin_api_version);   
                }
        }
-       return mysqlnd_plugins_counter;
-
+       return 0xCAFE;
 }
 /* }}} */