Преглед на файлове

! Fixed creation of db_last_error file during install and upgrade

Spuds преди 12 години
родител
ревизия
8c9514a27f
променени са 2 файла, в които са добавени 2 реда и са изтрити 4 реда
  1. 1 1
      other/install.php
  2. 1 3
      other/upgrade.php

+ 1 - 1
other/install.php

@@ -1969,7 +1969,7 @@ function updateSettingsFile($vars)
 function updateDbLastError() 
 {
 	// Write out the db_last_error file with the error timestamp 
-	file_put_contents(dirname(__FILE__) . '/db_last_error.php', "<?php\n$db_last_error = 0;\n?" . ">\n");
+	file_put_contents(dirname(__FILE__) . '/db_last_error.php', '<' . '?' . "php\n" . '$db_last_error = 0;' . "\n" . '?' . '>');
 	
 	return true;
 }

+ 1 - 3
other/upgrade.php

@@ -2170,10 +2170,8 @@ function changeSettings($config_vars)
 }
 function updateLastError() 
 {
-	global $db_last_error;
-
 	// clear out the db_last_error file
-	file_put_contents(dirname(__FILE__) . '/db_last_error.php', "<?php\n$db_last_error = 0;\n?" . ">\n");
+	file_put_contents(dirname(__FILE__) . '/db_last_error.php', '<' . '?' . "php\n" . '$db_last_error = 0;' . "\n" . '?' . '>');
 }
 
 function php_version_check()