From 03ca5b88468082fc180be5fc4b138d72aedadc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 21 Feb 2006 17:44:38 +0000 Subject: [PATCH] Trim spaces from config file to avoid unwanted outpu (path #1431566, thanks to Piotr_Skowronek - piotr_skowronek). --- ChangeLog | 3 +++ libraries/Config.class.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0ec69ee8..128957c2f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ $Source$ - Various bug fixes (bug #1435700, bug #1435806, undefined indexes). - XHTML fixes (patch #1435772, thanks to Matt LaPlante - cyberdog3k). * libraries/export/sql.php: New line before values (RFE #1435919). + * libraries/Config.class.php: Trim spaces from config file to avoid + unwanted outpu (path #1431566, thanks to Piotr_Skowronek - + piotr_skowronek). 2006-02-21 Sebastian Mendel * libraries/common.lib.php PMA_getUvaCondition(): diff --git a/libraries/Config.class.php b/libraries/Config.class.php index e5d78b0ef..b534f9a34 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -348,10 +348,10 @@ class PMA_Config $old_error_reporting = error_reporting(0); if ( function_exists('file_get_contents') ) { $eval_result = - eval( '?>' . file_get_contents($this->getSource()) ); + eval( '?>' . trim(file_get_contents($this->getSource())) ); } else { $eval_result = - eval( '?>' . implode('\n', file($this->getSource())) ); + eval( '?>' . trim(implode('\n', file($this->getSource()))) ); } error_reporting($old_error_reporting);