Skip to content

Commit

Permalink
Fix TypeError thrown during install
Browse files Browse the repository at this point in the history
This change solves the problem of a fatal error thrown during the execution of the post-install/update script. Specifically:

```
Fatal error: Uncaught TypeError: Composer\Downloader\DownloadManager::download(): Argument #3 ($prevPackage) must be of type ?Composer\Package\PackageInterface, bool given, called in ...\jakoch\phantomjs-installer\src\PhantomInstaller\Installer.php on line 192 and defined in .../Composer/Downloader/DownloadManager.php:182
```
  • Loading branch information
alexstewartja committed Sep 3, 2021
1 parent 1f2df4a commit 3518314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhantomInstaller/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function downloadUsingComposerVersion1($targetDir, $version)
$package = $this->createComposerInMemoryPackage($targetDir, $version);

try {
$downloadManager->download($package, $targetDir, false);
$downloadManager->download($package, $targetDir, null);
return true;
} catch (TransportException $e) {
if ($e->getStatusCode() === 404) {
Expand Down

0 comments on commit 3518314

Please sign in to comment.