Problem with error function on in_gateway_start

Daegaladh

Member
I've made a custom plugin that uses in_gateway_start hook, but when i try to use the error function there, it returns error 500

Code:
$this->error($LNG['customplugin_banned']);
I've also tried this with mixed results (sometimes work, sometimes doesn't):
Code:
$base = new base;
$base->error($LNG['customplugin_banned']);
Thanks for your help
 

Mark

Administrator
Staff member
check your error_log for clues. Error 500 is internal server, you are triggering something your server configuration does not like. Could be a mod_security rule.
 

Basti

Administrator
Staff member
function gateway() in in.php is a static function, you can not reference $this there, it triggers the error you are describing.

Code:
$base = new base;
$base->error($LNG['customplugin_banned']);
Is the correct method.
If you get mixed results I can almost asure there is a issue with plugin placement or 'if' calls

Would help to see the hole part
 
Top