ElkArte Community

Project Support => Support => Topic started by: augras on May 05, 2018, 05:14:48 am

Title: Error Notice: Trying to get property of non-object
Post by: augras on May 05, 2018, 05:14:48 am
Hi,
2 errors like this this morning : Trying to get property of non-object ! One from a user and one from the admin.
    albator
    Lundi 30 Avril 2018, 19:01:21
    IP

    wKUr2t1XX1zq7ey6xYlyw6btq2L9zadJ
    Type d'erreur: Générale
    Notice: Trying to get property of non-object

    https://augras.eu/puppy_forum/index.php?action=mentions;sa=fetch;api=json;lastsent=0

    Fichier: /home/augras/public_html/augras.eu/puppy_forum/sources/subs/CacheMethod/Filebased.php
    Ligne: 109

Code: [Select]
109: 	if ($value->expiration < time())

Philippe
Title: Re: Error Notice: Trying to get property of non-object
Post by: Spuds on May 05, 2018, 05:22:26 pm
Its possible that the decode fails .... you can try changing line 109 to
Code: [Select]
				if ($value === null || $value->expiration < time())
Title: Re: Error Notice: Trying to get property of non-object
Post by: augras on May 06, 2018, 04:04:26 am
I just change the code : wait and see !
Thank you Spuds,
Philippe
Title: Re: Error Notice: Trying to get property of non-object
Post by: Spuds on May 06, 2018, 09:28:09 am
cool ... hope that takes care of it.
Title: Re: Error Notice: Trying to get property of non-object
Post by: augras on May 06, 2018, 09:39:14 am
Nothing new until now : i hope it'is ok.
Philippe