Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: wintstar on October 05, 2021, 05:50:40 PM

Title: undefined function matchPackageVersion()
Post by: wintstar on October 05, 2021, 05:50:40 PM
Fresh install 2.1 RC4

QuoteFatal error: Uncaught Error: Call to undefined function matchPackageVersion() in /var/www/html/smf21rc/Sources/Subs-Themes.php:275

When testing with my mod Themes Demo (https://www.simplemachines.org/community/index.php?topic=572711.0) this error message came up. I checked if a theme with a low version is to be installed (theme-info/install/@for).


In Subs-Themes.php line 273  this should be missing:
require_once($sourcedir . '/Subs-Package.php');
Change this
// The theme isn't compatible with the current SMF version.
if (!$install_versions || !matchPackageVersion($the_version, $install_versions))
{
remove_dir($path);
fatal_lang_error('package_get_error_theme_not_compatible', false, SMF_FULL_VERSION);
}

to
// The theme isn't compatible with the current SMF version.
require_once($sourcedir . '/Subs-Package.php');
if (!$install_versions || !matchPackageVersion($the_version, $install_versions))
{
remove_dir($path);
fatal_lang_error('package_get_error_theme_not_compatible', false, SMF_FULL_VERSION);
}

This fixes the error in my test forum.
Title: Re: undefined function matchPackageVersion()
Post by: Sesquipedalian on October 06, 2021, 09:19:15 PM
Please open a bug report for this on GitHub.
Title: Re: undefined function matchPackageVersion()
Post by: wintstar on October 07, 2021, 02:56:28 AM
I have created:
https://github.com/SimpleMachines/SMF2.1/issues/7112