From 725f3e34560f24ae7fe4b75bd53ea07d0d78f94d Mon Sep 17 00:00:00 2001 From: Vadim Sadokhov Date: Fri, 28 Feb 2025 13:32:01 +0300 Subject: [PATCH] move error_reporting functions --- .../stdlib/system/system-functions.h | 10 ++++++++++ runtime-light/utils/php-warning.h | 19 ------------------- 2 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 runtime-light/utils/php-warning.h diff --git a/runtime-light/stdlib/system/system-functions.h b/runtime-light/stdlib/system/system-functions.h index 002bb3155f..d85399c9a3 100644 --- a/runtime-light/stdlib/system/system-functions.h +++ b/runtime-light/stdlib/system/system-functions.h @@ -67,6 +67,16 @@ inline array> f$debug_backtrace() noexcept { return {}; } +inline int64_t f$error_reporting([[maybe_unused]] int64_t level) noexcept { + php_warning("called stub error_reporting"); + return 0; +} + +inline int64_t f$error_reporting() noexcept { + php_warning("called stub error_reporting"); + return 0; +} + inline Optional f$exec([[maybe_unused]] const string &command) noexcept { php_critical_error("call to unsupported function"); } diff --git a/runtime-light/utils/php-warning.h b/runtime-light/utils/php-warning.h deleted file mode 100644 index 61a59f9c26..0000000000 --- a/runtime-light/utils/php-warning.h +++ /dev/null @@ -1,19 +0,0 @@ -// Compiler for PHP (aka KPHP) -// Copyright (c) 2025 LLC «V Kontakte» -// Distributed under the GPL v3 License, see LICENSE.notice.txt - -#pragma once - -#include - -#include "runtime-common/core/utils/kphp-assert-core.h" - -inline int64_t f$error_reporting([[maybe_unused]] int64_t level) noexcept { - php_warning("called stub error_reporting"); - return 0; -} - -inline int64_t f$error_reporting() noexcept { - php_warning("called stub error_reporting"); - return 0; -}