Show error 404 if the ID for experiment results is invalid
This commit is contained in:
@@ -59,9 +59,13 @@ class Results extends MY_Controller {
|
||||
*
|
||||
* @param string $experimentId The experiment for which to get the results
|
||||
*/
|
||||
public function experiment($experimentId) {
|
||||
public function experiment($experimentId = '') {
|
||||
$experiment = $this->experiment->getById($experimentId);
|
||||
|
||||
if (!is_array($experiment) || !isset($experiment['id'])) {
|
||||
show_404();
|
||||
}
|
||||
|
||||
// execute program runner
|
||||
$program = $this->program->getById($experiment['program_id']);
|
||||
$this->load->library('program_runner', array('program_driver' => $program['driver']));
|
||||
|
||||
Reference in New Issue
Block a user