Skip to content

Commit 5d261ed

Browse files
author
Till Brehm
committed
PHP compatibility changes (array definitions) in PowerDNS Plugin.
1 parent 92d734f commit 5d261ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/plugins-available/powerdns_plugin.inc.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,14 +536,14 @@ function soa_dnssec_create($data) {
536536
$log[] = sprintf("\r\n%s %s", date('c'), 'Running set-nsec3 command...');
537537
exec($cmd_set_nsec3, $log);
538538

539-
$pubkeys = [];
539+
$pubkeys = array();
540540
$cmd_show_zone = sprintf('%s show-zone %s 2>&1', $pdns_pdnssec, $zone);
541541
$log[] = sprintf("\r\n%s %s", date('c'), 'Running show-zone command...');
542542
exec($cmd_show_zone, $pubkeys);
543543

544544
$log = array_merge($log, $pubkeys);
545545

546-
$dnssec_info = array_merge($this->format_dnssec_pubkeys($pubkeys), ['', '== Raw log ============================'], $log);
546+
$dnssec_info = array_merge($this->format_dnssec_pubkeys($pubkeys), array('', '== Raw log ============================'), $log);
547547
$dnssec_info = implode("\r\n", $dnssec_info);
548548

549549
if ($app->dbmaster !== $app->db) {
@@ -553,7 +553,7 @@ function soa_dnssec_create($data) {
553553
}
554554

555555
function format_dnssec_pubkeys($lines) {
556-
$formatted = [];
556+
$formatted = array();
557557

558558
// We don't care about the first two lines about presigning and NSEC
559559
array_shift($lines);
@@ -574,7 +574,7 @@ function format_dnssec_pubkeys($lines) {
574574
$key_type = $matches_key_type[1];
575575

576576
// We only care about the KSK or CSK
577-
if (!in_array($key_type, ['KSK', 'CSK'], true)) {
577+
if (!in_array($key_type, array('KSK', 'CSK'), true)) {
578578
break;
579579
}
580580

@@ -677,7 +677,7 @@ function soa_dnssec_delete($data) {
677677
exec($cmd_disable_dnssec, $log);
678678

679679

680-
$dnssec_info = array_merge(['== Raw log ============================'], $log);
680+
$dnssec_info = array_merge(array('== Raw log ============================'), $log);
681681
$dnssec_info = implode("\r\n", $dnssec_info);
682682

683683
if ($app->dbmaster !== $app->db) {

0 commit comments

Comments
 (0)