[pLog-svn] corrupt cache

Jon Daley plogworld at jon.limedaley.com
Tue Sep 11 16:18:58 EDT 2007


I'll see about adding some debug stuff, though I suspect checking for the 
array at time of getting it out of the cache is too late.  I need to see 
when it is put in.

Was revision 2872 correct, and if it is, can you add a comment saying why 
the cache is being set, instead of removed, like the comment says?


On Tue, 11 Sep 2007, Oscar Renalias wrote:

> 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
>>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

It's better to know the truth and to stand alone than it is
to be wrong with a multitude.
-- Joyce Rogers


More information about the pLog-svn mailing list