Jelajahi Sumber

! Fixed creation of db_last_error file during install and upgrade

Spuds 12 tahun lalu
induk
melakukan
8c9514a27f
2 mengubah file dengan 2 tambahan dan 4 penghapusan
  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()