bug #1944077 [core] Config file containing a BOM

This commit is contained in:
Marc Delisle
2008-04-17 13:50:39 +00:00
parent 44ca7ef8f3
commit 3d565a6dbf
2 changed files with 5 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1906983 [export] Reimport of FUNCTION fails
- bug #1919808 [operations] Renaming a database fails to handle functions
- bug #1934401 [core] Cannot force a language
- bug #1944077 [core] Config file containing a BOM,
thanks to Gaetano Giunta - ggiunta
2.11.5.1 (2008-03-29)
- bug #1909711 [security] Sensitive data in session files

View File

@@ -372,6 +372,8 @@ class PMA_Config
* Parses the configuration file
*/
$old_error_reporting = error_reporting(0);
// avoid "headers already sent" error when file contains a BOM
ob_start();
if (function_exists('file_get_contents')) {
$eval_result =
eval('?>' . trim(file_get_contents($this->getSource())));
@@ -379,6 +381,7 @@ class PMA_Config
$eval_result =
eval('?>' . trim(implode("\n", file($this->getSource()))));
}
ob_end_clean();
error_reporting($old_error_reporting);
if ($eval_result === false) {