[eluser]nZac[/eluser]
I am somehow losing data between two functions that should work well together. The functions work in other situations but not here:
Code:
//Function 1
function get_questions($test_id)
{
errorLog('Testing_Center::get_questions() called',1);
$test_info = $this->get_test($test_id);
//test is null
$q_file = $this->get_questions_file($test_info);
}
//Function 2
function get_test($test_id)
{
errorLog('Testing_Center::get_test() called',1);
$test = $this->xml->get_test_info($test_id);
//$test will return a correct value
return $test;
}
$this->get_questions(1);
So what is happening is when function 2 gets the test info it var_dump()'s the proper output but when I put a var_dump in function 1 it spits out NULL.
Why would the data disappear?