Hi, I installed ahah_helper module and got error message that says array_smart_merge function already defined. I searched through my drupal installation and found that array_smart_merge function defined in hierarchical_select module.
I think the solution for these to modules (probably more in future) is to check whether the function is exist. If it exists, do nothing. But if not, then define it.
<?php
if (function_exists('array_smart_merge')) {
function array_smart_merge($array, $override) {
// function content
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | smart-merge-double_902360-1.patch | 1.15 KB | aron novak |
Comments
Comment #1
aron novakVery easy to fix, i agree.
Here is a patch.
HS does exactly the same, uses function_exists to avoid fatal errors.
Comment #2
scottrigby#689196: duplicate function in project