Skip to content

Commit 2a9e82d

Browse files
committed
even better fix
1 parent 5373a39 commit 2a9e82d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/mysqlnd/mysqlnd_plugin.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ PHPAPI unsigned int mysqlnd_plugin_register_ex(struct st_mysqlnd_plugin_header *
148148
if (plugin) {
149149
if (plugin->plugin_api_version == MYSQLND_PLUGIN_API_VERSION) {
150150
zend_hash_update(&mysqlnd_registered_plugins, plugin->plugin_name, strlen(plugin->plugin_name) + 1, &plugin, sizeof(void *), NULL);
151-
return mysqlnd_plugins_counter++;
152151
} else {
153152
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Plugin API version mismatch while loading plugin %s. Expected %d, got %d",
154-
plugin->plugin_name, MYSQLND_PLUGIN_API_VERSION, plugin->plugin_api_version);
153+
plugin->plugin_name, MYSQLND_PLUGIN_API_VERSION, plugin->plugin_api_version);
154+
return 0xCAFE;
155155
}
156156
}
157-
return 0xCAFE;
157+
return mysqlnd_plugins_counter++;
158158
}
159159
/* }}} */
160160

0 commit comments

Comments
 (0)