Recent Topics

1 Jul 09, 2006 05:27    

Fatal error: Using $this when not in object context in /home/balupton/public_html/blogs/inc/MODEL/users/_usercache.class.php on line 94

	/**
	 * Get a user object by login.
	 *
	 * Does not halt on error.
	 *
	 * @return false|User Reference to the user object or false if not found
	 */
	function & get_by_login( $login )
	{
		// Make sure we have a lowercase login:
		// We want all logins to be lowercase to guarantee uniqueness regardless of the database case handling for UNIQUE indexes.
		$login = strtolower( $login );

		if( !isset( $this->cache_login[$login] ) )
		{

Ideas?

Sorta making my blog just give a big error...

2 Jul 15, 2006 17:14

Still getting with the 1.8-beta release.

Heres the outputted html

<br />
<b>Fatal error</b>:  Using $this when not in object context in <b>/blogs/inc/MODEL/users/_usercache.class.php</b> on line <b>94</b><br />

It only happens when i go to index.php when logged in, if i delete my session cookie i can view my blog again.

The backoffice works fine.

Edit: if i go to index.php?skin=Custom i get the following:

<br />
<b>Warning</b>:  require(/home/balupton/public_html/blogs/skins//_main.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in <b>/home/balupton/public_html/blogs/inc/_blog_main.inc.php</b> on line <b>492</b><br />
<br />
<b>Fatal error</b>:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/home/balupton/public_html/blogs/skins//_main.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/balupton/public_html/blogs/inc/_blog_main.inc.php</b> on line <b>492</b><br />

3 Jul 15, 2006 17:28

GRRRR just tried clearing my cookies same thing! This is driving me mad!

4 Jul 15, 2006 17:32

Ok the;

Fatal error: Using $this when not in object context in /home/balupton/public_html/blogs/inc/MODEL/users/_usercache.class.php on line 94

Is a problem with the Lightality Skin....
( I renamed the lightality skin to something else, then renamed the custom skin to lightality, and it worked, renamed everything back, stopped working again ) - The Lightality version that is on my website is a february build, so this is a major pain in the ass, i will look into it more, anyone know of any changes to do with the usercache class that could cause this? - But this shouldn't happen anyway.....

But the other problem should get a look at.....

5 Jul 15, 2006 17:48

Found the culprit causing the first error;

//Used in the coments
if(is_logged_in() ) { // We want to display the comments form: 
	$Current_User = & new User( UserCache::get_by_login( $current_User->ID ) );
}

6 Jul 16, 2006 20:12

The problem is, that you cannot call UserCache statically!

Use $UserCache->get_by_login() instead.

"First error"? What's the other? Ah.. found it (you'd better started a new thread about it).
However, cannot confirm. skin_exists() in _blog_main.inc.php should take care of that.

Does it also fail with "skin=custom"?


Form is loading...