This module requires the SQL Server Driver for PHP, which in turn adds 26 native PHP functions that are all prefixed with "sqlsrv_". Drupal's module_implements relies on function_exists($modulename . '_' . $hookname) so any hook that happens to collide with one of these extension functions will cause one of these PHP functions to be called in error; Drupal behaves as though the sqlsrv extension is implementing hooks that don't actually exist in this module.
An example is the popular Services module which exposes hook_server_info. Since function_exists('sqlsrv_server_info') evaluates TRUE, that "hook" is registered and cached and the user will see
Warning: sqlsrv_server_info() expects exactly 1 parameter, 0 given in services_get_servers()
This patch uses hook_module_implements_alter to remove the offending conflicts as they occur. I list out all 26 sqlsrv_ functions even though I am only personally aware of the one Services conflict; more than a few of the other 25 seem generic enough to be implemented by at least one other module in the wild.
| Comment | File | Size | Author |
|---|---|---|---|
| sqlsrv-hook-conflict.patch | 1.39 KB | rymo |
Comments
Comment #1
damien tournoud commentedEw. That's bad... We really should rename this module.
In the meantime, I merged your patch in 7.x-1.x, thanks!