While trying to get the verification badge working on the system.inc.php page I ran into an issue that while trying to display the verification badges it always errored out and stopped at ar_EG with this error in PHP:

PHP Fatal error:  Uncaught UnexpectedValueException: internal corruption of phar "C:\laragon\www\ost\include\i18n\ar_EG.phar" (truncated entry) in C:\laragon\www\ost\include\class.plugin.php:500
Stack trace:
#0 C:\laragon\www\ost\include\class.plugin.php(500): Phar->__construct('C:/laragon/www/...')
#1 C:\laragon\www\ost\include\class.plugin.php(550): PluginManager::isVerified('C:/laragon/www/...')
#2 C:\laragon\www\ost\include\staff\system.inc.php(245): PluginManager::showVerificationBadge('C:/laragon/www/...')
#3 C:\laragon\www\ost\manage\system.php(23): require('C:\\laragon\\www\\...')
#4 {main}
  thrown in C:\laragon\www\ost\include\class.plugin.php on line 500

And when I remove that I get the same error for ar_SA like this:

PHP Fatal error:  Uncaught UnexpectedValueException: internal corruption of phar "C:\laragon\www\ost\include\i18n\ar_SA.phar" (truncated entry) in C:\laragon\www\ost\include\class.plugin.php:500
Stack trace:
#0 C:\laragon\www\ost\include\class.plugin.php(500): Phar->__construct('C:/laragon/www/...')
#1 C:\laragon\www\ost\include\class.plugin.php(550): PluginManager::isVerified('C:/laragon/www/...')
#2 C:\laragon\www\ost\include\staff\system.inc.php(245): PluginManager::showVerificationBadge('C:/laragon/www/...')
#3 C:\laragon\www\ost\manage\system.php(23): require('C:\\laragon\\www\\...')
#4 {main}
  thrown in C:\laragon\www\ost\include\class.plugin.php on line 500

But if anyone wants to still display a badge next to them even though they both are corrupted you can do so by adding the following to the showVerificationBadge function in class.plugin.php file right before switch statement begins:

try {
   self::isVerified($phar);
} catch (Exception) { ?>
  <!-- Your HTML goes here -->
  <?php return;
}

If you would like you could use the default HTML for failed verification in this, which then would make it look like:

try {
   self::isVerified($phar);
} catch (Exception) { ?>
  &nbsp;
  <span class="label label-danger" title="<?php
  echo __('The originator of this extension cannot be verified');
  ?>"><i class="icon icon-warning-sign"></i></span>
  <?php return;
}

Hope this helps and the team can fix those language packs soon.

    omaramir

    I have no issues with those language packs nor the verification badges. What version of osTicket are you running and how did you download the language packs? Maybe try redownloading them?

    Cheers.

      omaramir

      Those language packs are updated and should be working correctly now. Thanks for the notice!

      Cheers.

      Write a Reply...