Browse Source

Explicit unset of a by-reference variable, to avoid a weird side-effects (thanks to Mallory Desaintes for spotting this one).

jkbockstael 14 years ago
parent
commit
fd5dc42e5e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      main/course_info/infocours.php

+ 1 - 0
main/course_info/infocours.php

@@ -297,6 +297,7 @@ if ($form->validate() && is_settings_editable()) {
 	foreach ($update_values as $index => & $value) {
 		$update_values[$index] = Database::escape_string($value);
 	}
+	unset($value);
 	$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
 	$sql = "UPDATE $table_course SET
 				title 				= '".Security::remove_XSS($update_values['title'])."',