Commit d088e555 authored by anarcat's avatar anarcat

1083710 by tbosviel - fix php 5.3 warnings in DNS

parent 568a0643
......@@ -132,7 +132,8 @@ class provisionConfig_dns_zone extends provisionConfig_dns {
$this->data['dns_email'] = str_replace('@', '.', $this->data['server']->admin_email);
// increment the serial.
$this->store->records['@']['SOA']['serial'] = $records['serial'] = provisionService_dns::increment_serial($records['@']['SOA']['serial']);
$serial = (isset($records['@']['SOA']['serial']) ? $records['@']['SOA']['serial'] : NULL);
$this->store->records['@']['SOA']['serial'] = $records['serial'] = provisionService_dns::increment_serial($serial);
$this->data['records'] = $records;
}
......
......@@ -95,6 +95,15 @@ class provisionService extends provisionChainedState {
function config($config, $data = array()) {
$this->_config = null;
if (!isset($this->configs[$config])) {
$service = (!is_null($this->application_name)) ? $this->application_name : $this->service;
drush_log(dt('%service has no %name config file', array(
'%service' => $service,
'%name' => $config))
);
return $this;
}
if (!is_array($data) && is_string($data)) {
$data = array('name' => $data);
}
......@@ -145,10 +154,14 @@ class provisionService extends provisionChainedState {
}
elseif (!is_numeric($arg1)) {
if (is_array($arg2)) {
if (!is_array($this->_config->store->loaded_records[$arg1])) {
if (!isset($this->_config->store->loaded_records[$arg1])
|| !is_array($this->_config->store->loaded_records[$arg1]))
{
$this->_config->store->loaded_records[$arg1] = array();
}
if (!is_array($this->_config->store->records[$arg1])) {
if (!isset($this->_config->store->records[$arg1])
|| !is_array($this->_config->store->records[$arg1]))
{
$this->_config->store->records[$arg1] = array();
}
$this->_config->store->records[$arg1] = array_merge($this->_config->store->loaded_records[$arg1], $this->_config->store->records[$arg1], $arg2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment