Ignore:
Timestamp:
01/18/12 17:13:25 (13 years ago)
Author:
fpvanagthoven
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/jos-branch/setQuestion.php

    r237 r240  
    1313    $question_results = Question::get(array("uid" => $input->uid));
    1414    if (!empty($question_results)) {
    15         $question = $questions[0];
     15        $question = $question_results[0];
    1616    } else {
    1717        die("Error: attempt to edit a non-existing database object!");
     
    2222    if ($input->title) $question->title = $input->title;
    2323    if ($input->description) $question->description = $input->description;
    24     if ($input->category ) $question->category = null;
    25     if ($input->answers) $question->answers = null;
     24    if (isset($input->category) ) $question->category = null;
     25    if (isset($input->answers)) $question->answers = null;
    2626    $question->save();
    2727    $outputArray = array("created"=>false, "uid"=>$question->uid);
Note: See TracChangeset for help on using the changeset viewer.