MG 1.1 ErrorException: A non-numeric value encountered - library/XenGallery/CronEntry/CleanUps.php:12

Robert9

Well-known member
I have these nice error now from a cron job

ErrorException: A non-numeric value encountered - library/XenGallery/CronEntry/CleanUps.php:12

When i google for that i find an old thread where someone tells that we have to upgrade to 1.1.8, because of php-version x.
Now we have 1.1.17.

What can i do now?
 
This heavily implies that either you haven't upgraded to that version, or not all of the files have been uploaded for that version.

Can you tell me the exact contents on line 12 in the file library/XenGallery/CronEntry/CleanUps.php?
 
Shure
$db->delete('xengallery_exif_cache', 'cache_date > ' . XenForo_Application::$time - 86400);

seems that in my version i miss a pair of ()

$db->delete('xengallery_exif_cache', 'cache_date > ' . (XenForo_Application::$time - 86400));
$db->delete('xengallery_exif_cache', 'cache_date > ' . (XenForo_Application::$time - 86400));


I have deleted and uploaded the whole dir again.
Thank you.
 
Last edited:
This is the file i have downloaded a minute ago from here with version 1.1.17

Code:
<?php

class XenGallery_CronEntry_CleanUps
{
    protected static $_db = null;

    public static function runCleanUps()
    {
        $db = self::_getDb();
        $options = XenForo_Application::getOptions();

        $db->delete('xengallery_exif_cache', 'cache_date > ' . (XenForo_Application::$time - 86400));

        if ($options->xengalleryTagExpiry['enabled'])
        {
            $db->delete('xengallery_user_tag',
                'tag_state_date > ' . (XenForo_Application::$time - (86400 * $options->xengalleryTagExpiry['days'])) .
                ' AND tag_state IN (' . $db->quote(array('rejected', 'pending')) . ')'
            );
        }
    }

    protected static function _getDb()
    {
        if (self::$_db === null)
        {
            self::$_db = XenForo_Application::getDb();
        }

        return self::$_db;
    }
}

If this is wrong, then please get inside my account and download it for yourself.
 
I'm confused. You have signalled that you concurred that the file was not up-to-date and you have now re-uploaded it.

Are you still having issues?
 
I have issues still i have bought it, i never was able to use it till some days ago when we both found out that there is a problem with the js;
then i have downloaded it again and have uploaded at least the js, but probably all files.

Five minutes ago i have downloaded the file 1.1.17 again and checked the code from the new archive like seen above.

I can send it, you may can fetch it from my account, how you want.
 
I don't even know what your current problem is.

If you are still getting the same error on line 12 then you do not have the 1.1.17 files on your server. I can confirm that the file you pasted above is from 1.1.17, but the line 12 you posted earlier was not from 1.1.17 and that would have been the cause of that error.
 
Ok. Now o got it.
The first line was from the old archive with the same name and also from here.
The second line is from the downloaded file from this week/tonight.

The cron was running now without issues. Thank you.
 
Back
Top Bottom