The drush command drush civicrm-disable-debug
returns error The drush command 'civicrm-disable-debug' could not be found. Run 'drush cache-clear drush' to clear the commandfile cache if you have installed new extensions.
When entering drush
to get the list of all commands, the disable command is not displayed, but the enable command is. The enable command works, and both are declared in the same way in ~/sites/all/modules/civicrm/drupal/drush/civicrm.drush.inc:
/**
* Implementation of drush_hook_COMMAND_validate for command 'civicrm-enable-debug'
*/
function drush_civicrm_enable_debug_validate() {
return _civicrm_init();
}
function drush_civicrm_enable_debug() {
$settings = array(
'debug_enabled' => 1,
'backtrace' => 1,
);
foreach ($settings as $key => $val) {
$result = civicrm_api('Setting', 'create', array('version' => 3, $key => $val));
if ($result['is_error']) {
drush_log(dt('An error occurred: !message', array('!message' => $result['error_message'])), 'error');
return;
}
}
drush_log(dt('CiviCRM debug setting enabled.'), 'ok');
}
/**
* Implementation of drush_hook_COMMAND_validate for command 'civicrm-disable-debug'
*/
function drush_civicrm_disable_debug_validate() {
return _civicrm_init();
}
function drush_civicrm_disable_debug() {
$settings = array(
'debug_enabled' => 0,
'backtrace' => 0,
);
foreach ($settings as $key => $val) {
$result = civicrm_api('Setting', 'create', array('version' => 3, $key => $val));
if ($result['is_error']) {
drush_log(dt('An error occurred: !message', array('!message' => $result['error_message'])), 'error');
return;
}
}
drush_log(dt('CiviCRM debug setting disabled.'), 'ok');
}
What to do to "enable" the "disable" command? Meanwhile, i use phpmyadmin to change the value of the field "debug_enabled" in the table "civicrm_setting" to "i:0;" (without the ").
Config: Drupal 7.53; CiviCRM 4.7.14