Recent Topics

[3.3.2] Call to a member function get() on a non-object

Started by on Dec 06, 2009 – Contents updated: Dec 06, 2009

Dec 06, 2009 08:32    

The error Call to a member function get() on a non-object ..... _skin.funcs.php on line 521 comes out when a category accessed by its ID

To replicate:
- Uncheck the "Make canonical" option under "Category pages" of the SEO tab
- Check the "Meta description" in the same section
- Access any category by ID like BLOG_URL\index.php?cat=22

Related thread http://forums.b2evolution.net//viewtopic.php?t=20681

EDIT1: this bug exists in CVS version 12/6/09

EDIT2: the bug is still there as of 3/30/10 :(

Apr 03, 2010 09:55

Add the new bits /inc/_blog_main.inc.php

PHP

param'p''integer'''true );              // Specific post number to display
param'title''string'''true );                        // urtitle of post to display
param'redir''string''yes'false );                // Do we allow redirection to canonical URL? (allows to force a 'single post' URL for commenting)
param'preview''integer'0true );         // Is this preview ?
param'stats''integer');                                    // Deprecated but might still be used by spambots
param('cat''integer'''true );
 
.......
 
        if( ! $title_fallback )
        {    // We were not able to fallback to anythign meaningful:
            $disp '404';
            $disp_detail '404-post_not_found';
        }
    }
}
elseif( !empty( $cat ) )
{    // We are pointing to a chapter/category:
    $ChapterCache = & get_Cache'ChapterCache' );
    /**
     * @var Chapter
     */
    $Chapter = & $ChapterCache->get_by_ID$catfalse );
}

¥

Apr 03, 2010 10:48

¥åßßå wrote:

Add the new bits /inc/_blog_main.inc.php

Doesn't work in v4

For some reason the $Chapter object is not in GLOBALS, in other words adding the following to skin_init() fixes the problem

PHP

set_param'Chapter'$Chapter );

Apr 03, 2010 10:50

I don't have a 4.x copy and this is a 3.3.x bug :p

¥

Apr 15, 2010 03:06

Quick note: I added this to the todo list for CVS/v4.


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.