Skip to content

Commit 935801f

Browse files
committed
Fix updating packages on modx3-alpha2
1 parent 93d74a6 commit 935801f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

core/components/sitedashclient/docs/changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- Fix updating packages on MODX 3 (tested with alpha2)
2+
13
SiteDash Client 1.3.2-pl
24
-------------------------
35
Released on 2020-03-27

core/components/sitedashclient/src/Package/Update.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ protected function getUpdate() {
7070
'signature' => $this->packageSignature,
7171
]);
7272

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

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

0 commit comments

Comments
 (0)