
ZipArchive::getNameIndex will begin with /:string(11) "/LICENSE.md"
string(8) "/upload/"
protected function resolveAddOnFromZip(): The preg_match will never succeed when the first character is a /$fileName = $zip->getNameIndex($i); add $fileName = $fileName{0} == '/' ? substr($fileName, 1) : $fileName;public function validate(&$error = null): if (!$zip->locateName($jsonFile)) will fail when the first character is a /protected function getZipAddOnRootDir() to this:protected function getZipAddOnRootDir()
{
$zip = $this->zip();
$testFileName = $zip->getNameIndex(0);
return ($testFileName{0} == '/' ? '/' : '') . "upload/src/addons/{$this->addOnId}";
}
/if (substr($fileName, -1) === '/') add $fileName = $fileName{0} == '/' ? substr($fileName, 1) : $fileName;protected function getHashFileName(): Fails for the same reason as the Validator service doesprotected function getZipAddOnRootDir() to this:protected function getZipAddOnRootDir()
{
$zip = $this->zip();
$testFileName = $zip->getNameIndex(0);
return ($testFileName{0} == '/' ? '/' : '') . "upload/src/addons/{$this->addOnId}";
}
I can confirm that rebuilding an addon on 2.0.12 allows it to be successfully detected as a valid addon archive. It appears to have installed fine.So, my suggestion is to re-build the add-ons again using XF 2.0.12 or XF 2.1 Beta 4 and let us know if that changes the ability to then install that built add-on using XF 2.1.
We use essential cookies to make this site work, and optional cookies to enhance your experience.