Skip to content

Commit

Permalink
36296: Instant Error trying to access test: unserialize(): Argument #1
Browse files Browse the repository at this point in the history
…($data) must be of type string, null given
  • Loading branch information
mbecker-databay committed May 5, 2023
1 parent 9ec535a commit 6ca44dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected function doSelect(string $where_part): ilObjTestScoreSettings
->withPrintBestSolutionWithResult((bool) $row['print_bs_with_res'])
->withShowExamIdInTestResults((bool) $row['examid_in_test_res'])
->withExportSettings((int) $row['exportsettings'])
->withTaxonomyFilterIds(unserialize($row['result_tax_filters'])),
->withTaxonomyFilterIds(unserialize((string)$row['result_tax_filters'])),
(new ilObjTestSettingsGamification($test_id))
->withHighscoreEnabled((bool) $row['highscore_enabled'])
->withHighscoreAnon((bool) $row['highscore_anon'])
Expand Down
6 changes: 5 additions & 1 deletion Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,11 @@ private function addTestRunProperties(ilPropertyFormGUI $form)
$duration->setShowHours(true);
$duration->setShowMinutes(true);

$pw_time_array = explode(':', $this->testOBJ->getPassWaiting());
$pw_time_array = ["00", "000", "00", "00", "00"];
if($this->testOBJ->getPassWaiting() !== '') {
$pw_time_array = explode(':', $this->testOBJ->getPassWaiting());
}

$duration->setMonths((int) $pw_time_array[0]);
$duration->setDays((int) $pw_time_array[1]);
$duration->setHours((int) $pw_time_array[2]);
Expand Down

0 comments on commit 6ca44dc

Please sign in to comment.