From 489e44125ee6f878fee91cc5684c56c3d73d8e32 Mon Sep 17 00:00:00 2001 From: Denis Zubarev Date: Tue, 10 Mar 2026 16:38:55 +0300 Subject: [PATCH 1/2] supported level for php log level has been changed --- .../diagnostics/error-handling-functions.h | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/runtime-light/stdlib/diagnostics/error-handling-functions.h b/runtime-light/stdlib/diagnostics/error-handling-functions.h index bacfc91a1f..6e3ea6b75f 100644 --- a/runtime-light/stdlib/diagnostics/error-handling-functions.h +++ b/runtime-light/stdlib/diagnostics/error-handling-functions.h @@ -103,27 +103,12 @@ inline int64_t f$error_reporting(Optional new_error_level_opt = {}) noe return current_error_level; } - int64_t new_error_level{new_error_level_opt.val()}; - if (new_error_level != 0 && (new_error_level & ErrorHandlingState::SUPPORTED_ERROR_LEVELS) == 0) { - // ignore error_level if it's unsupported - return current_error_level; - } error_handling_st.minimum_log_level = 0; - if (new_error_level == 0) { - return current_error_level; - } else if ((new_error_level & E_ALL) == E_ALL) { - error_handling_st.minimum_log_level |= static_cast(E_ALL); + if (int64_t new_error_level{new_error_level_opt.val()}; new_error_level == 0) { return current_error_level; } - if ((new_error_level & E_NOTICE) == E_NOTICE) { - error_handling_st.minimum_log_level |= static_cast(E_NOTICE); - } - if ((new_error_level & E_WARNING) == E_WARNING) { - error_handling_st.minimum_log_level |= static_cast(E_WARNING); - } - if ((new_error_level & E_ERROR) == E_ERROR) { - error_handling_st.minimum_log_level |= static_cast(E_ERROR); - } + // currently only minimum_log_level == 0 and minimum_log_level == E_ALL are supported + error_handling_st.minimum_log_level = static_cast(E_ALL); return current_error_level; } From 1f917307b35263571016a2554cc1d4362cd66366 Mon Sep 17 00:00:00 2001 From: Denis Zubarev Date: Wed, 11 Mar 2026 17:27:39 +0300 Subject: [PATCH 2/2] added comment --- runtime-light/stdlib/diagnostics/error-handling-functions.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime-light/stdlib/diagnostics/error-handling-functions.h b/runtime-light/stdlib/diagnostics/error-handling-functions.h index 6e3ea6b75f..0f821ec5eb 100644 --- a/runtime-light/stdlib/diagnostics/error-handling-functions.h +++ b/runtime-light/stdlib/diagnostics/error-handling-functions.h @@ -108,7 +108,8 @@ inline int64_t f$error_reporting(Optional new_error_level_opt = {}) noe return current_error_level; } - // currently only minimum_log_level == 0 and minimum_log_level == E_ALL are supported + // currently only minimum_log_level == 0 and minimum_log_level == E_ALL are supported, + // because behavior in the runtime/ and runtime-light/ is different. we will fix this in the future. error_handling_st.minimum_log_level = static_cast(E_ALL); return current_error_level; }