Skip to content

Commit

Permalink
Fix updating packages on modx3-alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-H committed Mar 27, 2020
1 parent 93d74a6 commit 935801f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/components/sitedashclient/docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- Fix updating packages on MODX 3 (tested with alpha2)

SiteDash Client 1.3.2-pl
-------------------------
Released on 2020-03-27
Expand Down
4 changes: 2 additions & 2 deletions core/components/sitedashclient/src/Package/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ protected function getUpdate() {
'signature' => $this->packageSignature,
]);

if (!$this->package instanceof \modTransportPackage) {
if (!$this->package) {
throw new \RuntimeException('Package does not seem to be installed; can only update packages that are already installed.');
}
$this->log('Found package ' . $this->package->get('signature'));

$this->provider =& $this->package->getOne('Provider');
if (!$this->provider instanceof \modTransportProvider) {
if (!$this->provider) {
throw new \RuntimeException('Package does not have an associated package provider; can\'t update.');
}
$un = $this->provider->get('username');
Expand Down

0 comments on commit 935801f

Please sign in to comment.