Welcome Guest, Not a member yet? Register   Sign In
Use Language on Error Handling - show_error()
#4

(This post was last modified: 11-23-2020, 07:41 AM by nicolas33770.)

Thanks for this reply but it's not working. I got this error when I try to use this.

Form Security.php

Quote:public function csrf_show_error()
{
show_error(lang('message_error_403'), 403);
}


Quote:Type: Error

Message: Call to undefined function lang()

Filename: /var/www/gml-app/gml_system/core/Security.php

Line Number: 298

Backtrace:

File: /var/www/gml-app/index.php
Line: 310
Function: require_once

If I try have got a new error

Quote:public function csrf_show_error()
{
$this->lang->load('gml_general', 'french');
show_error(lang('message_error_403'), 403);
}


Quote:A PHP Error was encountered
Severity: Notice

Message: Undefined property: CI_Security::$lang

Filename: core/Security.php

Line Number: 298

Backtrace:

File: /var/www/gml-app/index.php
Line: 310
Function: require_once

An uncaught Exception was encountered
Type: Error

Message: Call to a member function load() on null

Filename: /var/www/gml-app/gml_system/core/Security.php

Line Number: 298

Backtrace:

File: /var/www/gml-app/index.php
Line: 310
Function: require_once
Reply


Messages In This Thread
RE: Use Language on Error Handling - show_error() - by nicolas33770 - 11-23-2020, 07:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB