PHP error

realpath(): Passing null to parameter #1 ($path) of type string is deprecated

/home/www/demonstrations/master.sondages.pro/htdocs/third_party/twig/twig/src/Loader/FilesystemLoader.php(40)

28     protected $cache = [];
29     protected $errorCache = [];
30 
31     private $rootPath;
32 
33     /**
34      * @param string|array $paths    A path or an array of paths where to look for templates
35      * @param string|null  $rootPath The root path common to all relative paths (null for getcwd())
36      */
37     public function __construct($paths = [], $rootPath = null)
38     {
39         $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
40         if (false !== $realPath = realpath($rootPath)) {
41             $this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
42         }
43 
44         if ($paths) {
45             $this->setPaths($paths);
46         }
47     }
48 
49     /**
50      * Returns the paths to the templates.
51      *
52      * @param string $namespace A path namespace

Stack Trace

#0
+
 /home/www/demonstrations/master.sondages.pro/htdocs/third_party/twig/twig/src/Loader/FilesystemLoader.php(40): realpath(null)
35      * @param string|null  $rootPath The root path common to all relative paths (null for getcwd())
36      */
37     public function __construct($paths = [], $rootPath = null)
38     {
39         $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).\DIRECTORY_SEPARATOR;
40         if (false !== $realPath = realpath($rootPath)) {
41             $this->rootPath = $realPath.\DIRECTORY_SEPARATOR;
42         }
43 
44         if ($paths) {
45             $this->setPaths($paths);
#1
+
 /home/www/demonstrations/master.sondages.pro/htdocs/third_party/yiiext/twig-renderer/ETwigViewRenderer.php(86): Twig\Loader\FilesystemLoader->__construct(array("/home/www/demonstrations/master.sondages.pro/htdocs/application"))
81             $this->_paths[] = $theme->getBasePath();
82         }
83 
84         $this->_paths[] = $app->getBasePath();
85 
86         $loader = new Twig_Loader_Filesystem($this->_paths);
87 
88         $defaultOptions = array(
89             'autoescape' => false, // false because other way Twig escapes all HTML in templates
90             'auto_reload' => true,
91             'cache' => $app->getRuntimePath() . '/twig_cache/',
#5
+
 /home/www/demonstrations/master.sondages.pro/htdocs/application/core/LSYii_Application.php(90): CApplication->__construct(array("name" => "LimeSurvey", "localeClass" => "LSYii_Locale", "defaultController" => "surveys", "modules" => array("HelloWorld" => array("class" => "modules.root.HelloWorld.HelloWorldModule")), ...))
85         if (array_key_exists('use_custom_twig_extensions', $baseConfig) && $baseConfig ['use_custom_twig_extensions']) {
86             $aApplicationConfig = $this->getTwigCustomExtensionsConfig($baseConfig['usertwigextensionrootdir'], $aApplicationConfig);
87         }
88 
89         /* Construct CWebApplication */
90         parent::__construct($aApplicationConfig);
91 
92         /* Because we have app now : we have to call again the config (usage of Yii::app() for publicurl) */
93         $this->setConfigs();
94         /* Since session can be set by DB : need to be set again … */
95         $this->setSessionByDB($aApplicationConfig);
2022-11-04 09:25:13 Apache/2.4.38 (Debian) Yii Framework/1.1.26