0

I have inherited a CMS system called PyroCMS and it is showing an error. I am not familiar with this CMS so any suggestions would be welcome.

"A PHP Error was encountered Severity: 8192 Message: Non-static method Lex_Parser::inject_noparse() should not be called statically, assuming $this from incompatible context Filename: libraries/Template.php Line Number: 285"

Here is the relevant piece of code from the Template file.

// Now that *all* parsing is sure to be done we inject the {{ noparse }} contents back into the output
if (class_exists('Lex_Parser')) {
    $this->_body = Lex_Parser::inject_noparse($this->_body);
}

// Want it returned or output to browser?
if (!$return) {
    $this->_ci->output->set_output($this->_body);
}

return $this->_body;
}

I have searched extensively for any clue as to what might be causing this but all I can come up with is dozens of other sites with the same issue

Thank you for taking the time to help.

atymic
  • 3,093
  • 1
  • 13
  • 26
Adrian
  • 1
  • 2
  • are you familiar with. https://github.com/pyrocms/lex#basic-usage? – Vickel Aug 16 '18 at 16:16
  • I did search github/pyrocms extensively but found nothing useful. I will take a look at the link you provided – Adrian Aug 16 '18 at 16:34
  • keep in mind, that this is 5-6 years old and might not be compatable with CI 3.x or php 7.x (might use deprecated functions) – Vickel Aug 16 '18 at 16:36
  • anyway, this line seems to be wrong: `$this->_body = Lex_Parser::inject_noparse($this->_body);` – Vickel Aug 16 '18 at 16:42
  • Yes Vickel, that is line 285, but I have no idea how to rectify it – Adrian Aug 16 '18 at 17:50
  • Have a look at: https://stackoverflow.com/questions/25846310/error-should-not-be-called-statically-assuming-this-from-incompatible-context – Vickel Aug 16 '18 at 17:56

0 Answers0