Problem/Motivation
When using drush to run database updates after trying to upgrade from search_api_acquia to acquia_search there are errors output to the console.
TypeError: strtr(): Argument #2 ($from) must be of type array, string given in strtr() (line 115 of /var/www/html/docroot/modules/syslog/syslog.module).
I think these stem from the module using an empty string instead of an empty array or a NULL value in the watchdog calls.
e.g.:
// Disable Search API Acquia module.
if (module_exists('search_api_acquia')) {
module_disable(['search_api_acquia']);
watchdog('acquia_search', 'Search API Acquia has been disabled. You can safely remove it from your codebase.', '', WATCHDOG_INFO);
}
Steps to reproduce
Have a d7 site with search_api_acquia setup
Download an install acquia_search
Run:
drush updb
Proposed resolution
Fix the watchdog issues
Create a patch
Review the patch
Commit the patch
Remaining tasks
Fix the watchdog issues
Create a patch
Review the patch
Commit the patch
User interface changes
None
API changes
None
Data model changes
None
Issue fork acquia_connector-3349846
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
the_g_bomb commentedSorry, not sure what happened, but the the MR connected in #2 is for a different Issue that is unrelated to this one. No idea why it is connected to this.
MR in #3 should be tested
Comment #6
i-trokhanenkoComment #7
i-trokhanenkoThe #39 patch solves the error for me. Thanks!
Comment #8
mglamanAt first I thought we should pass an array.
But now I see it allows
nullandarray.Here is the code from syslog:
Thanks for the MR!
Comment #9
mglamanwhoops, fixing status
Comment #11
mglamanThanks! We have a pending release planned that will include this fix.