Skip to content

Instantly share code, notes, and snippets.

@eeree
Created January 19, 2015 08:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eeree/e69f2e5520ccb3b191ac to your computer and use it in GitHub Desktop.
Save eeree/e69f2e5520ccb3b191ac to your computer and use it in GitHub Desktop.
Fix to "Error. Invalid package. Remote repository URL: http://packages.ez.no/ezpublish/4.7/4.7.0" in eZ Publish 4.x during the install process.
file: lib/ezc/Archive/src/entry.php
@@ -196,11 +196,11 @@ class ezcArchiveEntry
{
if ( $withPrefix )
{
- return $this->fileStructure->path;
+ return trim($this->fileStructure->path);
}
else
{
- return $this->getPathWithoutPrefix( $this->fileStructure->path, $this->prefix );
+ return $this->getPathWithoutPrefix( trim($this->fileStructure->path), $this->prefix );
}
}
file: ez/kernel/classes/ezpackage.php
137,7 +1137,7 @@ class eZPackage
// Search for the files we want to extract
foreach( $archive as $entry )
{
- if ( in_array( $entry->getPath(), $fileList ) )
+ if ( in_array( trim($entry->getPath(),DIRECTORY_SEPARATOR), $fileList ) )
{
if ( !$archive->extractCurrent( $archivePath ) )
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment