Skip to content

Commit

Permalink
merge received with minimal expected data to ensure that all required…
Browse files Browse the repository at this point in the history
… keys are always available (#14)
  • Loading branch information
Matthias Molitor committed May 3, 2016
1 parent e104456 commit 1c94799
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ByteCodeCache/PhpOpcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ protected function calculateCacheSlots()
protected function normalizeStatus($cacheData)
{
if (!is_array($cacheData)) {
return $this->createFallbackStatusData();
$cacheData = array();
}
return $cacheData;
return array_replace_recursive($this->getDefaultStatusData(), $cacheData);
}

/**
Expand Down Expand Up @@ -172,7 +172,7 @@ protected function bytesToMb($bytes)
*
* @return array<string, mixed>
*/
protected function createFallbackStatusData()
protected function getDefaultStatusData()
{
return array(
'opcache_enabled' => false,
Expand Down

0 comments on commit 1c94799

Please sign in to comment.