Skip to content

Commit 5493c1e

Browse files
Minor bug fixes
1 parent 0e9fdf0 commit 5493c1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ProcessWireUpgradeCheck.module

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ProcessWireUpgradeCheck extends WireData implements Module {
2323
return array(
2424
'title' => 'Upgrades Checker',
2525
'summary' => 'Automatically checks for core and installed module upgrades at routine intervals.',
26-
'version' => 2,
26+
'version' => 3,
2727
'autoload' => "template=admin",
2828
'singular' => true,
2929
'author' => 'Ryan Cramer',
@@ -54,7 +54,7 @@ class ProcessWireUpgradeCheck extends WireData implements Module {
5454
$cache = $this->cache;
5555
$cacheName = $this->className() . "_loginHook";
5656
$cacheData = $cache ? $cache->get($cacheName) : null;
57-
if(!empty($cacheData)) $cache = json_decode($cacheData, true);
57+
if(!empty($cacheData) && is_string($cacheData)) $cache = json_decode($cacheData, true);
5858

5959
$branches = empty($cacheData) ? $this->getCoreBranches() : $cacheData['branches'];
6060
$master = $branches['master'];
@@ -203,7 +203,7 @@ class ProcessWireUpgradeCheck extends WireData implements Module {
203203
if(!is_array($data)) {
204204
$error = $http->getError();
205205
if(!$error) $error = $this->_('Error retrieving modules directory data');
206-
$this->error($error);
206+
$this->error($error . " (" . $this->className() . ")");
207207
return array();
208208
}
209209
}

0 commit comments

Comments
 (0)