/home/forge/dev.relionbattery.com/craft/plugins/comments/services/Comments_SettingsService.php(58)
46 47 // Do we even have any settings setup? By default - anything can be commented on 48 if ($permissions) { 49 if (isset($permissions[$element->classHandle])) { 50 if ($permissions[$element->classHandle] != '*') { 51 // Check for various elements 52 if ($element->classHandle == 'Entry') { 53 $id = $element->section->id; 54 } else { 55 $id = $element->group->id; 56 } 57 58 if (!in_array($id, $permissions[$element->classHandle])) { 59 return false; 60 } 61 } 62 } 63 64 // Check for individual element permissions 65 // foreach ($element->content->attributes as $key => $value) { 66 // $field = craft()->fields->getFieldByHandle($key); 67 68 // if ($field['type'] == 'Comments') { 69 // if (isset($value['commentEnabled'])) { 70 // if (!$value['commentEnabled']) {
#0 |
+
–
/home/forge/dev.relionbattery.com/craft/app/etc/web/WebApp.php(694): CApplication->handleError(2, "in_array() expects parameter 2 to be array, string given", "/home/forge/dev.relionbattery.com/craft/plugins/comments/service...", 58) 689 if (version_compare(PHP_VERSION, '7.1', '>=') && strpos($message, 'Narrowing occurred during type inference. Please file a bug report') !== false) 690 { 691 return; 692 } 693 694 parent::handleError($code, $message, $file, $line); 695 } 696 697 /** 698 * Raised right AFTER the application processes the request. 699 * |
#1 |
unknown(0): Craft\WebApp->handleError(2, "in_array() expects parameter 2 to be array, string given", "/home/forge/dev.relionbattery.com/craft/plugins/comments/service...", 58, ...)
|
#2 |
+
–
/home/forge/dev.relionbattery.com/craft/plugins/comments/services/Comments_SettingsService.php(58): in_array("4", "") 53 $id = $element->section->id; 54 } else { 55 $id = $element->group->id; 56 } 57 58 if (!in_array($id, $permissions[$element->classHandle])) { 59 return false; 60 } 61 } 62 } 63 |
#3 |
+
–
/home/forge/dev.relionbattery.com/craft/plugins/comments/variables/CommentsVariable.php(64): Craft\Comments_SettingsService->checkPermissions(Craft\EntryModel) 59 $html = craft()->templates->render($templateFile, $variables); 60 61 craft()->path->setTemplatesPath($oldPath); 62 63 // Finally - none of this matters if the permission to comment on this element is denied 64 if (!craft()->comments_settings->checkPermissions($element)) { 65 return false; 66 } 67 68 return new \Twig_Markup($html, craft()->templates->getTwig()->getCharset()); 69 } |
#4 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Template.php(716): Craft\CommentsVariable->form("17470", array("order" => "dateCreated asc", "elementId" => "17470", "level" => "1")) 711 // to call is not supported. If ignoreStrictCheck is true, we should return null. 712 try { 713 if (!$arguments) { 714 $ret = $object->$method(); 715 } else { 716 $ret = \call_user_func_array([$object, $method], $arguments); 717 } 718 } catch (\BadMethodCallException $e) { 719 if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) { 720 return; 721 } |
#5 |
+
–
/home/forge/dev.relionbattery.com/craft/app/etc/templating/BaseTemplate.php(64): Twig\Template->getAttribute(Craft\CommentsVariable, "form", array("17470", array("order" => "dateCreated asc")), "method", ...) 59 if (is_object($object) && $object instanceof BaseElementModel) 60 { 61 $this->_includeElementInTemplateCaches($object); 62 } 63 64 return parent::getAttribute($object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck); 65 } 66 67 // Private Methods 68 // ========================================================================= 69 |
#6 |
+
–
/home/forge/dev.relionbattery.com/craft/storage/runtime/compiled_templates/2d/2d2b65fa9934c0c775c76527d43fc8448f48a8a7a10bf2e5dc79a77244fb65eb.php(220): Craft\BaseTemplate->getAttribute(Craft\CommentsVariable, "form", array("17470", array("order" => "dateCreated asc")), "method") 215 $context["params"] = ["order" => "dateCreated asc"]; 216 // line 112 217 echo " 218 \t\t\t\t"; 219 // line 113 220 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["craft"] ?? $this->getContext($context, "craft")), "comments", []), "form", [0 => $this->getAttribute(($context["entry"] ?? $this->getContext($context, "entry")), "id", []), 1 => ($context["params"] ?? $this->getContext($context, "params"))], "method"), "html", null, true); 221 echo " 222 \t\t\t</div> 223 \t\t</div> 224 \t</div> 225 |
#7 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Template.php(217): __TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d->block_content(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("gascripts" => array(__TwigTemplate_57a4901701f5451eea2da32e7b6e8d8fab15b7f2d3b789cfc6d7c719bc264823, "block_gascripts"), "head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"))) 212 throw new \LogicException('A block must be a method on a \Twig\Template instance.'); 213 } 214 215 if (null !== $template) { 216 try { 217 $template->$block($context, $blocks); 218 } catch (Error $e) { 219 if (!$e->getSourceContext()) { 220 $e->setSourceContext($template->getSourceContext()); 221 } 222 |
#8 |
+
–
/home/forge/dev.relionbattery.com/craft/storage/runtime/compiled_templates/37/370554516f365fffebb2a8e1439b115ea592c1957127a0b1033d89920630756b.php(232): Twig\Template->displayBlock("content", array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("gascripts" => array(__TwigTemplate_57a4901701f5451eea2da32e7b6e8d8fab15b7f2d3b789cfc6d7c719bc264823, "block_gascripts"), "head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"))) 227 $this->loadTemplate("_layout", "_layout", 135, "875157721")->display($context); 228 // line 136 229 echo " 230 \t "; 231 // line 137 232 $this->displayBlock('content', $context, $blocks); 233 // line 141 234 echo " 235 \t "; 236 // line 142 237 $this->loadTemplate("_layout", "_layout", 142, "254571843")->display($context); |
#9 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Template.php(456): __TwigTemplate_57a4901701f5451eea2da32e7b6e8d8fab15b7f2d3b789cfc6d7c719bc264823->doDisplay(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("gascripts" => array(__TwigTemplate_57a4901701f5451eea2da32e7b6e8d8fab15b7f2d3b789cfc6d7c719bc264823, "block_gascripts"), "head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"))) 451 } 452 453 protected function displayWithErrorHandling(array $context, array $blocks = []) 454 { 455 try { 456 $this->doDisplay($context, $blocks); 457 } catch (Error $e) { 458 if (!$e->getSourceContext()) { 459 $e->setSourceContext($this->getSourceContext()); 460 } 461 |
#10 |
+
–
/home/forge/dev.relionbattery.com/craft/app/etc/templating/BaseTemplate.php(26): Twig\Template->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("gascripts" => array(__TwigTemplate_57a4901701f5451eea2da32e7b6e8d8fab15b7f2d3b789cfc6d7c719bc264823, "block_gascripts"), "head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"))) 21 */ 22 protected function displayWithErrorHandling(array $context, array $blocks = array()) 23 { 24 try 25 { 26 parent::displayWithErrorHandling($context, $blocks); 27 } 28 catch (\Twig_Error_Runtime $e) 29 { 30 if (craft()->config->get('suppressTemplateErrors')) 31 { |
#11 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Template.php(423): Craft\BaseTemplate->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("gascripts" => array(__TwigTemplate_57a4901701f5451eea2da32e7b6e8d8fab15b7f2d3b789cfc6d7c719bc264823, "block_gascripts"), "head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"))) 418 return $this->blocks; 419 } 420 421 public function display(array $context, array $blocks = []) 422 { 423 $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); 424 } 425 426 public function render(array $context) 427 { 428 $level = ob_get_level(); |
#12 |
+
–
/home/forge/dev.relionbattery.com/craft/storage/runtime/compiled_templates/2d/2d2b65fa9934c0c775c76527d43fc8448f48a8a7a10bf2e5dc79a77244fb65eb.php(44): Twig\Template->display(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"))) 39 $context["pageHeader"] = $this->getAttribute(($context["blogLanding"] ?? $this->getContext($context, "blogLanding")), "pageHeader", []); 40 // line 5 41 $context["suppressPrimaryHeader"] = true; 42 // line 1 43 $this->parent = $this->loadTemplate("_layout", "blog/_entry", 1); 44 $this->parent->display($context, array_merge($this->blocks, $blocks)); 45 } 46 47 // line 6 48 public function block_head($context, array $blocks = []) 49 { |
#13 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Template.php(456): __TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d->doDisplay(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"))) 451 } 452 453 protected function displayWithErrorHandling(array $context, array $blocks = []) 454 { 455 try { 456 $this->doDisplay($context, $blocks); 457 } catch (Error $e) { 458 if (!$e->getSourceContext()) { 459 $e->setSourceContext($this->getSourceContext()); 460 } 461 |
#14 |
+
–
/home/forge/dev.relionbattery.com/craft/app/etc/templating/BaseTemplate.php(26): Twig\Template->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"))) 21 */ 22 protected function displayWithErrorHandling(array $context, array $blocks = array()) 23 { 24 try 25 { 26 parent::displayWithErrorHandling($context, $blocks); 27 } 28 catch (\Twig_Error_Runtime $e) 29 { 30 if (craft()->config->get('suppressTemplateErrors')) 31 { |
#15 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Template.php(423): Craft\BaseTemplate->displayWithErrorHandling(array("entry" => Craft\EntryModel, "user" => null, "currentUser" => null, "craft" => Craft\CraftVariable, ...), array("head" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_head"), "scripts" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_scripts"), "content" => array(__TwigTemplate_b65c979d78434a4134efcb8c9e95987144922b03bc22ee872b10edbc2300c98d, "block_content"))) 418 return $this->blocks; 419 } 420 421 public function display(array $context, array $blocks = []) 422 { 423 $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); 424 } 425 426 public function render(array $context) 427 { 428 $level = ob_get_level(); |
#16 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Template.php(435): Twig\Template->display(array("entry" => Craft\EntryModel)) 430 ob_start(); 431 } else { 432 ob_start(function () { return ''; }); 433 } 434 try { 435 $this->display($context); 436 } catch (\Exception $e) { 437 while (ob_get_level() > $level) { 438 ob_end_clean(); 439 } 440 |
#17 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/TemplateWrapper.php(47): Twig\Template->render(array("entry" => Craft\EntryModel), array()) 42 */ 43 public function render($context = []) 44 { 45 // using func_get_args() allows to not expose the blocks argument 46 // as it should only be used by internal code 47 return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []); 48 } 49 50 /** 51 * Displays the template. 52 * |
#18 |
+
–
/home/forge/dev.relionbattery.com/craft/app/vendor/twig/twig/src/Environment.php(384): Twig\TemplateWrapper->render(array("entry" => Craft\EntryModel)) 379 * @throws SyntaxError When an error occurred during compilation 380 * @throws RuntimeError When an error occurred during rendering 381 */ 382 public function render($name, array $context = []) 383 { 384 return $this->load($name)->render($context); 385 } 386 387 /** 388 * Displays a template. 389 * |
#19 |
+
–
/home/forge/dev.relionbattery.com/craft/app/services/TemplatesService.php(256): Twig\Environment->render("blog/_entry", array("entry" => Craft\EntryModel)) 251 $lastRenderingTemplate = $this->_renderingTemplate; 252 $this->_renderingTemplate = $template; 253 254 try 255 { 256 $result = $twig->render($template, $variables); 257 } 258 catch (\RuntimeException $e) 259 { 260 if (!craft()->config->get('devMode')) 261 { |
#20 |
+
–
/home/forge/dev.relionbattery.com/craft/app/controllers/BaseController.php(74): Craft\TemplatesService->render("blog/_entry", array("entry" => Craft\EntryModel)) 69 * @throws HttpException 70 * @return mixed The rendered template if $return is set to `true`. 71 */ 72 public function renderTemplate($template, $variables = array(), $return = false, $processOutput = false) 73 { 74 if (($output = craft()->templates->render($template, $variables)) !== false) 75 { 76 if ($processOutput) 77 { 78 $output = $this->processOutput($output); 79 } |
#21 |
+
–
/home/forge/dev.relionbattery.com/craft/app/controllers/TemplatesController.php(68): Craft\BaseController->renderTemplate("blog/_entry", array("entry" => Craft\EntryModel)) 63 public function actionRender($template, array $variables = array()) 64 { 65 // Does that template exist? 66 if (craft()->templates->doesTemplateExist($template)) 67 { 68 $this->renderTemplate($template, $variables); 69 } 70 else 71 { 72 throw new HttpException(404); 73 } |
#22 |
unknown(0): Craft\TemplatesController->actionRender("blog/_entry", array("entry" => Craft\EntryModel))
|
#23 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Craft\TemplatesController, array("blog/_entry", array("entry" => Craft\EntryModel))) 104 elseif($param->isDefaultValueAvailable()) 105 $ps[]=$param->getDefaultValue(); 106 else 107 return false; 108 } 109 $method->invokeArgs($object,$ps); 110 return true; 111 } 112 } |
#24 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Craft\TemplatesController, ReflectionMethod, array("variables" => array("entry" => Craft\EntryModel), "template" => "blog/_entry")) 42 { 43 $methodName='action'.$this->getId(); 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 49 $controller->$methodName(); 50 return true; 51 } 52 } |
#25 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(array("variables" => array("entry" => Craft\EntryModel), "template" => "blog/_entry")) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#26 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/web/CController.php(286): CController->runAction(CInlineAction) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#27 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#28 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/web/CWebApplication.php(282): CController->run("render") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#29 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/web/CWebApplication.php(141): CWebApplication->runController("templates/render") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#30 |
+
–
/home/forge/dev.relionbattery.com/craft/app/etc/web/WebApp.php(291): CWebApplication->processRequest() 286 287 // If this is an action request, call the controller 288 $this->_processActionRequest(); 289 290 // If we're still here, finally let UrlManager do it's thing. 291 parent::processRequest(); 292 } 293 294 /** 295 * Returns the target application language. 296 * |
#31 |
+
–
/home/forge/dev.relionbattery.com/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#32 |
+
–
/home/forge/dev.relionbattery.com/craft/app/index.php(73): CApplication->run() 68 if ($lastError && strpos($lastError['message'], 'max_input_vars') !== false) 69 { 70 throw new \Craft\ErrorException($lastError['message']); 71 } 72 73 $app->run(); |
#33 |
+
–
/home/forge/dev.relionbattery.com/index.php(19): require_once("/home/forge/dev.relionbattery.com/craft/app/index.php") 14 } 15 16 exit('Could not find your craft/ folder. Please ensure that <strong><code>$craftPath</code></strong> is set correctly in '.__FILE__); 17 } 18 19 require_once $path; |