This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report
Hi,
I work on a project for montth and this morning I tried to connect to the CP (as every single day) and I got this :
Fatal error: Using $this when not in object context in /var/www/vhosts/nameofmywebsite.be/system/ee/legacy/libraries/Typography.php on line 2606
It is really badly timed as I have to deliver the website on Monday!! Don’t know what to do, first time I got this!
What is this?
Thanks.
Around line 2609 in system/ee/legacy/libraries/Typography.phpreplace:
return preg_replace_callback(
"/(\<pre>\<code.*?\>)(.*?)(\<\/code\>\<\/pre\>)/is",
function ($matches) use ($pre, $post) {
$code = $matches[2];
$code = ee()->functions->encode_ee_tags($code, TRUE);
return $pre.$matches[1].$this->encode_tags($code).$matches[3].$post;
},
$str
);
with
// patch rob1
// @todo remove when PHP 5.3 is no longer supported
$that = $this;
return preg_replace_callback(
"/(\<pre>\<code.*?\>)(.*?)(\<\/code\>\<\/pre\>)/is",
function ($matches) use ($pre, $post, $that) {
$code = $matches[2];
$code = ee()->functions->encode_ee_tags($code, TRUE);
return $pre.$matches[1].$that->encode_tags($code).$matches[3].$post;
},
$str
);
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```