proper initialisation of $oldquestionid

This commit is contained in:
skodak
2006-05-23 09:31:04 +00:00
parent 6ebca3c77e
commit 48cd99809d
+2 -1
View File
@@ -146,6 +146,7 @@
$replaceold = !$hasresponses && $replaceinall;
}
$oldquestionid = false;
if (!$replaceold) { // create a new question
$oldquestionid = $question->id;
if (!$makecopy) {
@@ -161,7 +162,7 @@
error("Failed to save the question!");
}
if(isset($oldquestionid)) {
if(!empty($oldquestionid)) {
// create version entries for different quizzes
$version = new object();
$version->oldquestion = $oldquestionid;