• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Errror after Upgrad from 3.20.5 to 3.20.10

BlackCrow

Chevereto Member
Hi,

i have an error after Upgrade from 3.20.5 to 3.20.10.
Error Message:
Aw, snap! Internal Server Error [debug @ print] - https://chevereto.com/go/v3debug

** errorId #8b930baa8b80feb8 **
ParseError [0]: syntax error, unexpected '='
At /lib/G/classes/class.gettext.php:406

Stack trace:
#0 unknown file(unknown line): class_autoloader('G\Gettext')
#1 /app/lib/classes/class.l10n.php(193): spl_autoload_call('G\Gettext')
#2 /app/lib/classes/class.l10n.php(121): CHV\L10n:😛rocessTranslation('de')
#3 /app/lib/classes/class.l10n.php(132): CHV\L10n->__construct()
#4 /app/lib/classes/class.l10n.php(232): CHV\L10n::getInstance()
#5 /app/lib/classes/class.l10n.php(252): CHV\L10n::getStatic('gettext')
#6 /app/lib/classes/class.l10n.php(220): CHV\L10n::getGettext()
#7 /app/lib/l10n.php(43): CHV\L10n::ngettext('image', 'images', '183')
#8 /app/lib/classes/class.user.php(520): _n('image', 'images', '183')
#9 /app/lib/classes/class.user.php(486): CHV\User::fill(Array)
#10 /app/lib/classes/class.user.php(58): CHV\User::formatArray(Array)
#11 /app/lib/classes/class.login.php(153): CHV\User::getSingle('1', 'id')
#12 /app/lib/classes/class.login.php(129): CHV\Login::login('1', 'cookie')
#13 /app/lib/classes/class.login.php(109): CHV\Login::loginCookie('KEEP_LOGIN')
#14 /app/lib/classes/class.login.php(77): CHV\Login::tryCookies()
#15 /app/web.php(63): CHV\Login::tryLogin()
#16 /lib/G/classes/class.handler.php(125): CHV\{closure}(G\Handler)
#17 /app/web.php(407): G\Handler->__construct(Array)
#18 /app/loader.php(230): require_once('/app/web.php')
#19 /index.php(20): include_once('/app/loader.php')


Look into class.gettext.php - Line 406:
$msgstr ??= null;

I don't know this syntax in PHP but if i comment out the line everything works without error.

What's the problem here?


Edit: complete function:
PHP:
private function parsePOEntry($chunk)
    {
        $chunks = explode("\n", $chunk);
        foreach ($chunks as $chunk) {
            if (starts_with('#', $chunk) or is_null($chunk)) {
                continue;
            }
            if (is_null($this->translation_plural) and starts_with('"Plural-Forms:', $chunk)) {
                $this->parsePluralData($chunk);
            }
            if (preg_match('/^msgid "(.*)"/', $chunk, $matches)) {
                $msgid = $matches[1];
            } elseif (preg_match('/^msgstr "(.*)"/', $chunk, $matches)) {
                $msgstr = $matches[1];
            } elseif (preg_match('/^#~ msgid "(.*)"/', $chunk, $matches)) {
                $msgid = $matches[1];
            } elseif (preg_match('/^#~ msgstr "(.*)"/', $chunk, $matches)) {
                $msgstr = $matches[1];
            } elseif (preg_match('/^msgstr\[([0-9])+\] "(.*)"/', $chunk, $matches)) {
                if ($matches[2] == '') {
                    continue;
                }
                if (!is_array($msgstr ?? null)) {
                    $msgstr = [];
                }
                $msgstr[$matches[1]] = $matches[2];
            }
        }
        //$msgstr ??= null;
        if ($msgstr == '') {
            $msgstr = null;
        }
        if (empty($msgid)) {
            return null;
        } else {
            return [
                'msgid' => $msgid,
                'msgstr'=> is_null($msgstr) ? null : (array)$msgstr
            ];
        }
    }
 
Back
Top