Welcome Guest, Not a member yet? Register   Sign In
Load Language from within an own Library
#3

[eluser]codeworxx[/eluser]
Okay, that's the code of the Library:

Code:
class Displayerror
{
    
    function raiseError( $message = '' )
    {
        $return = '';
        if( empty( $message ) ) $message = $this->lang->line( 'error_undefined' );
        $return .= "\n".'<div class="error">'."\n";
        $return .= "\t".'<div class="message"><h1>Error</h1><span>'.$message.'</span></div>'."\n";
        $return .= '</div>'."\n";
        return $return;
    }
    
}

An this is the Error:

Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: Displayerror::$lang

Filename: libraries/Displayerror.php

Line Number: 19
Fatal error: Call to a member function line() on a non-object in /srv/www/vhosts/mydomain.de/httpdocs/application/libraries/Displayerror.php on line 19

Line 19 is that line:
Code:
if( empty( $message ) ) $message = $this->lang->line( 'error_undefined' );

Thanks,
Sascha


Messages In This Thread
Load Language from within an own Library - by El Forum - 11-01-2009, 12:30 PM
Load Language from within an own Library - by El Forum - 11-01-2009, 02:43 PM
Load Language from within an own Library - by El Forum - 11-02-2009, 02:29 AM
Load Language from within an own Library - by El Forum - 11-02-2009, 06:58 AM
Load Language from within an own Library - by El Forum - 11-02-2009, 07:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB