[pLog-svn] corrupt cache

Oscar Renalias oscar at renalias.net
Tue Sep 11 12:24:28 EDT 2007


Maybe you can add some extra code in that function to log a message to
the log file every time its results are an array instead of an Article
object? You could also log the stack trace if possible, so that we can
see where this method was called from.

On 9/11/07, Jon Daley <plogworld at jon.limedaley.com> wrote:
>         I have had an issue on one of my installations, where every once
> in a while, I get:
>
> Fatal error: Call to a member function on a non-object in
> /tmp/summary/%%39^392^3922B7DE%%post.template.php on line 6
>
>
> The $post article from post.template is not a post, but instead an array
> of posts.  I tracked it down to:
>
> function getArticle( $articleId ){
>     return( $this->get( "id", $articleId, CACHE_ARTICLES ));
> }
>
> which is returning an array, rather than one article. The relevant cache
> file is:
> cache_dba5d91846ce1a5e63734dfcbcb481cb_069059b7ef840f0c74a814ec9237b6ec
>
> which contains all! articles ever posted on the site.
>
> If I erase that file, and then reload, it is fine.
>
> So, somewhere, the cache is getting set to all articles for a particular
> article id...
>
> It is running rev 5887.
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> For many people, one of the most frustrating aspects of life is not
> being to understand other people's behavior.  We see them as "guilty"
> instead of "innocent."
> -- Unknown
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list