use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
7
class BaseSettingsController extends Controller
8
{
9
/**
10
* {@inheritdoc}
11
*
12
* @deprecated
13
*/
14
protected function get($id)
15
{
16
@trigger_error('Getting services directly from the container is deprecated in KunstmaanAdminBundle 5.1 and will be removed in KunstmaanAdminBundle 6.0. Register your controllers as services and inject the necessary dependencies.', E_USER_DEPRECATED);
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
Loading history...
17
18
return parent::get($id);
19
}
20
21
/**
22
* {@inheritdoc}
23
*
24
* @deprecated
25
*/
26
protected function getParameter($name)
27
{
28
@trigger_error('Getting parameters directly from the container is deprecated in KunstmaanAdminBundle 5.1 and will be removed in KunstmaanAdminBundle 6.0. Register your controllers as services and inject the necessary parameters.', E_USER_DEPRECATED);
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
If you suppress an error, we recommend checking for the error condition explicitly: