PHP notice

Object of class stdClass could not be converted to int

/mnt/data/shnoulle/nginx/www/master/application/models/TemplateConfiguration.php(1527)

1515             [':template_name'=>$this->template_name]
1516         );
1517     }
1518 
1519     /**
1520      * Get showpopups value from config or template configuration
1521      */
1522     public function getshowpopups()
1523     {
1524         $config = (int) App()->getConfig('showpopups');
1525         if ($config == 2) {
1526             if (isset($this->oOptions->showpopups)) {
1527                 $this->showpopups = (int)$this->oOptions->showpopups;
1528             } else {
1529                 $this->showpopups = 1;
1530             }
1531         } else {
1532             $this->showpopups = $config;
1533         }
1534     }
1535 
1536     /**
1537      * Set each option key value to 'inherit' instead of having only one 'inherit' value for options.
1538      * Keys are fetched from parent xml configuration.
1539      */

Stack Trace

#0
+
 /mnt/data/shnoulle/nginx/www/master/application/models/TemplateConfig.php(162): TemplateConfiguration->getshowpopups()
157         $this->setBasics($sTemplateName, $iSurveyId, $bUseMagicInherit);
158         $this->setMotherTemplates(); // Recursive mother templates configuration
159         $this->setThisTemplate(); // Set the main config values of this template
160         $this->createTemplatePackage($this); // Create an asset package ready to be loaded
161         $this->removeFiles();
162         $this->getshowpopups();
163 
164         if (!empty($sTemplateName) && !empty($iSurveyId)) {
165             self::$aPreparedToRender[$sTemplateName][$iSurveyId][$bUseMagicInherit] = $this;
166         }
167         return $this;
#1
+
 /mnt/data/shnoulle/nginx/www/master/application/models/TemplateConfiguration.php(824): TemplateConfig->prepareTemplateRendering("copie_vanilla")
819      * @throws Exception
820      */
821     public function getHasOptionPage()
822     {
823         $filteredName = Template::templateNameFilter($this->template->name);
824         $oRTemplate = $this->prepareTemplateRendering($filteredName);
825 
826         $sOptionFile = 'options'.DIRECTORY_SEPARATOR.'options.twig';
827         while (!file_exists($oRTemplate->path.$sOptionFile)) {
828             $oMotherTemplate = $oRTemplate->oMotherTemplate;
829             if (!($oMotherTemplate instanceof TemplateConfiguration)) {
#4
+
 /mnt/data/shnoulle/nginx/www/master/application/models/TemplateConfiguration.php(1479): CActiveRecord->__get("hasOptionPage")
1474                 // NOTE: this is object recursive (if parent configuration field is set to inherit,
1475                 // then it will lead to this method again.)
1476                 $sAttribute = $this->getParentConfiguration()->$name;
1477             }
1478         } else {
1479             $sAttribute = parent::__get($name);
1480         }
1481 
1482         return $sAttribute;
1483     }
1484 
2020-05-06 06:46:22 nginx/1.18.0 Yii Framework/1.1.22-dev