* Fix bug #42821.
This commit is contained in:
@@ -98,10 +98,10 @@ class program extends control
|
||||
public function product(int $programID = 0, string $browseType = 'noclosed', string $orderBy = 'order_asc', int $recTotal = 0, int $recPerPage = 15, int $pageID = 1)
|
||||
{
|
||||
$programPairs = $this->program->getPairs();
|
||||
if(!isset($programPairs[$programID]))
|
||||
if($programID && !isset($programPairs[$programID]))
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => '404 Not found'));
|
||||
return print(js::error($this->lang->notFound) . js::locate($this->createLink('program', 'browse')));
|
||||
return $this->send(array('result' => 'fail', 'message' => $this->lang->notFound, 'load' => $this->createLink('program', 'browse')));
|
||||
}
|
||||
|
||||
$programID = $this->program->checkAccess($programID, $programPairs);
|
||||
|
||||
Reference in New Issue
Block a user