I am going through an older module created in PHP 5.x.x and we have just moved the website to the php 7.2.x so we suddenly got the error in a helper class
Uncaught Error: Using $this when not in object context in
There is a dispatch event in helper that is using the following code there:
Mage::dispatchEvent('magento_string_filter_before', array('content' => $contentObj, 'object' => $params['object'], 'params' => $params, 'helper' => $this));
and i believe that is not compatible with the PHP 7 so how i can convert this and what replacement we have?
Thanks!