NotFoundHttpException is thrown if no record is found in
DataAccessFunction
This commit is contained in:
@@ -26,6 +26,7 @@ namespace Thelia\Core\Template\Smarty\Plugins;
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Thelia\Core\Template\Smarty\AbstractSmartyPlugin;
|
||||
use Thelia\Core\Security\SecurityContext;
|
||||
use Thelia\Core\Template\ParserContext;
|
||||
@@ -391,9 +392,9 @@ class DataAccessFunctions extends AbstractSmartyPlugin
|
||||
}
|
||||
|
||||
return $this->dataAccess($objectLabel, $params, $data, $noGetterData);
|
||||
} else {
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user