Skip to content

Commit

Permalink
split error message in log of send_wap_link
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzap committed Jan 19, 2025
1 parent 6d0bdec commit dcc62d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions application/models/gateway/Gammu_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ function _send_wap_link($data)
$ret = exec ($cmd . ' 2>&1', $output, $result_code);
if ($result_code !== 0)
{
log_message('error', 'Failure to inject message into Gammu with gammu-smsd-inject.');
log_message(
'error',
'Failure to inject message into Gammu with gammu-smsd-inject. '."\n".
'Command: '.$cmd."\n".
'Output: '.implode("\n", $output)."\n".
'Result code: '.$result_code
"Details:\n"
. 'Command: ' . $cmd . "\n"
. 'Output: ' . implode("\n", $output) . "\n"
. 'Result code: ' . $result_code
);
show_error(tr('Failure to inject message into Gammu with gammu-smsd-inject. See kalkun logs.'), 500);

Expand All @@ -80,6 +81,7 @@ function _send_wap_link($data)
$preg_match_ret = preg_match('/Written message with ID ([\d]+)/i', $ret, $matches);
if ( ! empty($matches))
{
// Overwrite SendingDateTime with the one selected by the user.
$this->db->where('ID', $matches[1])
->set('SendingDateTime', $data['date'])
->update('outbox');
Expand Down

0 comments on commit dcc62d6

Please sign in to comment.