PHP warning

file_get_contents(): Filename cannot be empty

C:\cg64\applications\questionnaire\application\models\TemplateConfiguration.php(121)

109             }
110         }
111         else
112         {
113             $this->xmlFile = $this->path.DIRECTORY_SEPARATOR.'config.xml';
114         }
115 
116 
117         //////////////////////
118         // Config file loading
119 
120         $bOldEntityLoaderState = libxml_disable_entity_loader(true);             // @see: http://phpsecurity.readthedocs.io/en/latest/Injection-Attacks.html#xml-external-entity-injection
121         $sXMLConfigFile        = file_get_contents( realpath ($this->xmlFile));  // @see: Now that entity loader is disabled, we can't use simplexml_load_file; so we must read the file with file_get_contents and convert it as a string
122 
123         // Simple Xml is buggy on PHP < 5.4. The [ array -> json_encode -> json_decode ] workaround seems to be the most used one.
124         // @see: http://php.net/manual/de/book.simplexml.php#105330 (top comment on PHP doc for simplexml)
125         $this->config  = json_decode( json_encode ( ( array ) simplexml_load_string($sXMLConfigFile), 1));
126 
127         // Template configuration
128         // Ternary operators test if configuration entry exists in the config file (to avoid PHP notice in user custom templates)
129         $this->viewPath                 = (isset($this->config->engine->pstpldirectory))           ? $this->path.DIRECTORY_SEPARATOR.$this->config->engine->pstpldirectory.DIRECTORY_SEPARATOR                            : $this->path;
130         $this->siteLogo                 = (isset($this->config->files->logo))                      ? $this->config->files->logo->filename                                                                                 : '';
131         $this->filesPath                = (isset($this->config->engine->filesdirectory))           ? $this->path.DIRECTORY_SEPARATOR.$this->config->engine->filesdirectory.DIRECTORY_SEPARATOR                            : $this->path . '/files/';
132         $this->cssFramework             = (isset($this->config->engine->cssframework))             ? $this->config->engine->cssframework                                                                                  : '';
133         $this->packages                 = (isset($this->config->engine->packages->package))        ? $this->config->engine->packages->package                                                                             : array();

Stack Trace

#0
+
 C:\cg64\applications\questionnaire\application\models\TemplateConfiguration.php(121): file_get_contents("")
116 
117         //////////////////////
118         // Config file loading
119 
120         $bOldEntityLoaderState = libxml_disable_entity_loader(true);             // @see: http://phpsecurity.readthedocs.io/en/latest/Injection-Attacks.html#xml-external-entity-injection
121         $sXMLConfigFile        = file_get_contents( realpath ($this->xmlFile));  // @see: Now that entity loader is disabled, we can't use simplexml_load_file; so we must read the file with file_get_contents and convert it as a string
122 
123         // Simple Xml is buggy on PHP < 5.4. The [ array -> json_encode -> json_decode ] workaround seems to be the most used one.
124         // @see: http://php.net/manual/de/book.simplexml.php#105330 (top comment on PHP doc for simplexml)
125         $this->config  = json_decode( json_encode ( ( array ) simplexml_load_string($sXMLConfigFile), 1));
126 
#1
+
 C:\cg64\applications\questionnaire\application\models\Template.php(143): TemplateConfiguration->setTemplateConfiguration("", "337116")
138      * @return StdClass
139      */
140     public static function getTemplateConfiguration($sTemplateName='', $iSurveyId='')
141     {
142         $oTemplate = new TemplateConfiguration;
143         $oTemplate->setTemplateConfiguration($sTemplateName, $iSurveyId);
144         return $oTemplate;
145     }
146 
147     /**
148      * Return the list of ALL files present in the file directory
#2
+
 C:\cg64\applications\questionnaire\application\models\Template.php(304): Template::getTemplateConfiguration("", "337116")
299      */
300     public static function getInstance($sTemplateName='', $iSurveyId='')
301     {
302         if (empty(self::$instance))
303         {
304             self::$instance = self::getTemplateConfiguration($sTemplateName, $iSurveyId);
305         }
306         return self::$instance;
307     }
308 
309     /**
2024-03-29 00:09:23 Microsoft-IIS/8.5 Yii Framework/1.1.18