Skip to content

Commit

Permalink
Merge pull request #229 from colinodell/fix/php-5.3-compatibility
Browse files Browse the repository at this point in the history
Fix PHP 5.3 compatibility issue
  • Loading branch information
cweagans committed Jul 20, 2018
2 parents eac9ec1 + 599290e commit 02ae1ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Patches.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ protected function getAndApplyPatch(RemoteFilesystem $downloader, $install_path,
$patch_levels = array('-p1', '-p0', '-p2', '-p4');

// Check for specified patch level for this package.
if (!empty($this->composer->getPackage()->getExtra()['patchLevel'][$package->getName()])){
$patch_levels = array($this->composer->getPackage()->getExtra()['patchLevel'][$package->getName()]);
$extra = $this->composer->getPackage()->getExtra();
if (!empty($extra['patchLevel'][$package->getName()])){
$patch_levels = array($extra['patchLevel'][$package->getName()]);
}
// Attempt to apply with git apply.
$patched = $this->applyPatchWithGit($install_path, $patch_levels, $filename);
Expand Down

0 comments on commit 02ae1ef

Please sign in to comment.