@@ -109,7 +109,7 @@ |
||
109 | 109 | $attachment->update(); |
110 | 110 | } else { |
111 | 111 | $attachment = $this->invoice->create_attachment($filename, $this->invoice->get_label(), "application/pdf"); |
112 | - if ( !$attachment |
|
112 | + if (!$attachment |
|
113 | 113 | || !$this->invoice->set_parameter("midcom.helper.datamanager2.type.blobs", $name, $attachment->guid . ":" . $attachment->guid)) { |
114 | 114 | throw new midcom_error("Failed to create invoice attachment for pdf: " . midcom_connection::get_error_string()); |
115 | 115 | } |
@@ -125,7 +125,8 @@ discard block |
||
125 | 125 | try { |
126 | 126 | $pdf_helper->render_and_attach(); |
127 | 127 | return $this->reply(true, $this->_l10n->get('pdf created')); |
128 | - } catch (midcom_error $e) { |
|
128 | + } |
|
129 | + catch (midcom_error $e) { |
|
129 | 130 | return $this->reply(false, $this->_l10n->get('pdf creation failed') . ': ' . $e->getMessage()); |
130 | 131 | } |
131 | 132 | } |
@@ -136,7 +137,8 @@ discard block |
||
136 | 137 | try { |
137 | 138 | $pdf_helper->render_and_attach('reminder'); |
138 | 139 | return $this->reply(true, $this->_l10n->get('reminder pdf created')); |
139 | - } catch (midcom_error $e) { |
|
140 | + } |
|
141 | + catch (midcom_error $e) { |
|
140 | 142 | return $this->reply(false, $this->_l10n->get('reminder pdf creation failed') . ': ' . $e->getMessage()); |
141 | 143 | } |
142 | 144 | } |