From bef98f6a04a5e46e9b4ccc90c8bd5496f696ed4b Mon Sep 17 00:00:00 2001 From: nguyenanhung Date: Tue, 15 Aug 2023 16:05:42 +0700 Subject: [PATCH] Release version 3.0.8 --- helpers/system_notification.php | 4 ++-- src/SystemNotification.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helpers/system_notification.php b/helpers/system_notification.php index b7e502f..a91044e 100644 --- a/helpers/system_notification.php +++ b/helpers/system_notification.php @@ -7,8 +7,8 @@ * Date: 2/12/20 * Time: 11:00 */ -if (!function_exists('system_notification_error_message')) { - function system_notification_error_message($e): string +if (!function_exists('_sn_helper_error_message_')) { + function _sn_helper_error_message_($e): string { return 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage(); } diff --git a/src/SystemNotification.php b/src/SystemNotification.php index eb15fb6..53336c4 100644 --- a/src/SystemNotification.php +++ b/src/SystemNotification.php @@ -61,7 +61,7 @@ public static function mantis(array $sdkConfig = array(), string $module = '', s } } catch (Exception $e) { if (function_exists('log_message')) { - log_message('error', system_notification_error_message($e)); + log_message('error', _sn_helper_error_message_($e)); log_message('error', 'Error Trace As String: ' . $e->getTraceAsString()); } } @@ -105,7 +105,7 @@ public static function slack(array $sdkConfig = array(), string $module = '', st } } catch (Exception $e) { if (function_exists('log_message')) { - log_message('error', system_notification_error_message($e)); + log_message('error', _sn_helper_error_message_($e)); log_message('error', 'Error Trace As String: ' . $e->getTraceAsString()); } } @@ -144,7 +144,7 @@ public static function telegram(array $sdkConfig = array(), string $module = '', } } catch (Exception $e) { if (function_exists('log_message')) { - log_message('error', system_notification_error_message($e)); + log_message('error', _sn_helper_error_message_($e)); log_message('error', 'Error Trace As String: ' . $e->getTraceAsString()); } } @@ -187,7 +187,7 @@ public static function google_chat(array $sdkConfig = array(), string $module = } } catch (Exception $e) { if (function_exists('log_message')) { - log_message('error', system_notification_error_message($e)); + log_message('error', _sn_helper_error_message_($e)); log_message('error', 'Error Trace As String: ' . $e->getTraceAsString()); } } @@ -225,7 +225,7 @@ public static function teams(array $sdkConfig = array(), string $module = '', st } } catch (Exception $e) { if (function_exists('log_message')) { - log_message('error', system_notification_error_message($e)); + log_message('error', _sn_helper_error_message_($e)); log_message('error', 'Error Trace As String: ' . $e->getTraceAsString()); } }