From c08a8bb5265e72cb4580b7ef981485d101d9a8cb Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Wed, 8 Oct 2025 15:18:48 +0200 Subject: [PATCH] Remove all debug statements and error_log calls from codebase --- core/class/declarationtva.class.php | 5 ----- core/class/declarationtva_config.class.php | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/core/class/declarationtva.class.php b/core/class/declarationtva.class.php index 415bf74..48518fa 100644 --- a/core/class/declarationtva.class.php +++ b/core/class/declarationtva.class.php @@ -1155,7 +1155,6 @@ class DeclarationTVA if ($ecmfiles_path && file_exists($ecmfiles_path)) { try { // Log the path being used for debugging - error_log("DeclarationTVA: Using ECM files path: " . $ecmfiles_path); require_once $ecmfiles_path; $ecmfile = new EcmFiles($this->db); @@ -1178,19 +1177,15 @@ class DeclarationTVA $link_result = $this->linkDocumentToDeclaration($declaration_id, $ecmfile->id); if (!$link_result) { // Log the error but don't fail the whole process - error_log("DeclarationTVA: Failed to link document to declaration: " . $this->error); } } else { // Log the error but don't fail the whole process - error_log("DeclarationTVA: Failed to create ECM file record: " . $ecmfile->error); } } catch (Exception $e) { // Log the error but don't fail the whole process - error_log("DeclarationTVA: Exception creating ECM file: " . $e->getMessage()); } } else { // Log that ECM files class is not available - error_log("DeclarationTVA: ECM files class not found. Tried paths: " . implode(', ', $ecmfiles_paths)); } } diff --git a/core/class/declarationtva_config.class.php b/core/class/declarationtva_config.class.php index 97a07ae..5d81017 100644 --- a/core/class/declarationtva_config.class.php +++ b/core/class/declarationtva_config.class.php @@ -62,14 +62,12 @@ class DeclarationTVA_Config $create_result = $this->db->query($create_sql); if (!$create_result) { - error_log("DeclarationTVA: Failed to create config table: " . $this->db->lasterror()); return false; } // Insert default configuration values $this->insertDefaultConfigValues(); - error_log("DeclarationTVA: Created declarationtva_config table"); } return true; @@ -296,11 +294,6 @@ class DeclarationTVA_Config } } - // Debug: Log what we found - error_log("DeclarationTVA: getAccountingAccounts() found " . count($accounts) . " accounts"); - if (!empty($accounts)) { - error_log("DeclarationTVA: First account: " . $accounts[0]['account_number'] . " - " . $accounts[0]['label']); - } return $accounts; } @@ -384,7 +377,6 @@ class DeclarationTVA_Config foreach ($default_config as $key => $default_value) { $value = $this->get('bank_' . $key, $default_value); $config[$key] = $value; - error_log("DeclarationTVA: Retrieved bank config " . $key . ": " . $value); } return $config; @@ -398,9 +390,7 @@ class DeclarationTVA_Config */ public function updateBankAccountConfiguration($bank_account_id) { - error_log("DeclarationTVA: Updating bank account to: " . $bank_account_id); $result = $this->set('bank_bank_account', (int)$bank_account_id); - error_log("DeclarationTVA: Bank account update result: " . ($result ? 'success' : 'failed')); return $result; }