Closed (fixed)
Project:
Provision
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2011 at 16:27 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent
I tried to run the following command lines to create a zone and add some records to them:
drush @server_master provision-zone create foobar.com
drush @server_master provision-zone rr-add foobar.com www A 1.2.3.4
The zone gets created. But the rr-add command throws an error at line 44 of dns.drush.inc
With the following change the record is added correctly.
$record = d()->service('dns')->config('zone', $zone)->record_get($name);
if (!is_array($record[$type])) {
$record[$type] = array();
}
$record[$type] = array_merge($record[$type], array($destination));
It seems that $record is not initialized the first time a zone gets created through drush.
Comments
Comment #1
anarcat commentedFix committed, thanks. In the future, please provide a proper patch and mark the issue as "needs review", see also http://drupal.org/patch/create