Skip to content

Commit

Permalink
Added checks for zend_scm methods
Browse files Browse the repository at this point in the history
  • Loading branch information
amitdar committed Apr 12, 2015
1 parent 96a7d03 commit cdae6a1
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions zray.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,25 @@ private function collectVersionData(&$storage) {
$isLatest = ($isLatest) ? 'yes' : 'no';

if(function_exists('zend_shm_cache_store')) {
zend_shm_cache_store('ZF2_version_isLatest', $isLatest);
zend_shm_cache_store('ZF2_version_isLatest', $isLatest);
zend_shm_cache_store('ZF2_version_latest', $latest);
}
} else {
$latest = null;
$isLatest = 'N/A';
zend_shm_cache_store('ZF2_version_isLatest', $isLatest);
zend_shm_cache_store('ZF2_version_latest', $latest);
if(function_exists('zend_shm_cache_store')) {
zend_shm_cache_store('ZF2_version_isLatest', $isLatest);
zend_shm_cache_store('ZF2_version_latest', $latest);
}
}
} else {
$isLatest = zend_shm_cache_fetch('ZF2_version_isLatest');
$latest = zend_shm_cache_fetch('ZF2_version_latest');
if(function_exists('zend_shm_cache_fetch')) {
$isLatest = zend_shm_cache_fetch('ZF2_version_isLatest');
$latest = zend_shm_cache_fetch('ZF2_version_latest');
} else {
$latest = null;
$isLatest = 'N/A';
}
}

$latest = ($latest === null) ? 'N/A' : $latest;
Expand Down

0 comments on commit cdae6a1

Please sign in to comment.