I have upgraded from PHP 5.3 to PHP 5.4 now are my class broken and I do not understand it why.
I have build this class:
class _g
{
public static $init;
public static function init()
{
if ( self::$init == null )
{
self::$init->sysLang = ( isset( $_SESSION['SYSTEM_LANG'] ) ? $_SESSION['SYSTEM_LANG'] : 'dk' );
self::$init->apiPath = CSS_API_PATH .'theme/'. API_THEME_PATH_GFX .'/gfx/';
}
return self::$init;
}
}
And I get this error message:
Warning: Creating default object from empty value in /var/html/.....
And I really do not understand how I can fix this problem?