From 6faa009faad39be196c28d290ba89ff58d20172a Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Thu, 23 Oct 2014 10:30:40 +0200
Subject: [PATCH] dkim: fixed issue with php 5.3

---
 interface/web/mail/mail_domain_dkim_create.php | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/interface/web/mail/mail_domain_dkim_create.php b/interface/web/mail/mail_domain_dkim_create.php
index fa1e298a31..4769735c60 100644
--- a/interface/web/mail/mail_domain_dkim_create.php
+++ b/interface/web/mail/mail_domain_dkim_create.php
@@ -124,8 +124,14 @@ function new_selector ($old_selector, $domain) {
 }
 
 //* get dkim-strength for server_id
-$mail_server_id = $app->functions->intval( $app->db->queryOneRecord("SELECT server_id from mail_domain WHERE domain = ?", $_POST['domain']) );
-$dkim_strength = $app->functions->intval( $app->getconf->get_server_config($mail_server_id, 'mail')['dkim_strength'] );
+//$mail_server_id = $app->functions->intval( $app->db->queryOneRecord("SELECT server_id from mail_domain WHERE domain = ?", $_POST['domain']) );
+//$dkim_strength = $app->functions->intval( $app->getconf->get_server_config($mail_server_id, 'mail')['dkim_strength'] );
+$rec = $app->db->queryOneRecord("SELECT server_id from mail_domain WHERE domain = ?", $_POST['domain']);
+$mail_server_id = $app->functions->intval($rec['server_id']);
+unset ($rec);
+$rec = $app->getconf->get_server_config($mail_server_id, 'mail');
+$dkim_strength = $app->functions->intval($rec['dkim_strength']);
+unset ($rec);
 if ( empty($dkim_strength) ) $dkim_strength = 1024;
 
 switch ($_POST['action']) {
-- 
GitLab