Skip to content

Commit 42cb4da

Browse files
committed
Fix a couple of review issues
1 parent 62ee488 commit 42cb4da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opcache.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ public function getGraphDataSetJson(): string
624624
];
625625
}
626626

627-
if (isset($this->status['interned_strings_usage']['buffer_size'], $this->status['interned_strings_usage']['used_memory']) && $this->status['interned_strings_usage']['buffer_size'] > 0) {
627+
if (isset($this->status['interned_strings_usage']['buffer_size'], $this->status['interned_strings_usage']['used_memory'], $this->status['interned_strings_usage']['free_memory']) && $this->status['interned_strings_usage']['buffer_size'] > 0) {
628628
$dataset['interned'] = [
629629
$this->status['interned_strings_usage']['used_memory'],
630630
$this->status['interned_strings_usage']['free_memory'],
@@ -2767,9 +2767,9 @@ function refreshData() {
27672767
var xhr = new XMLHttpRequest();
27682768
xhr.open('GET', '?json=1');
27692769
xhr.onload = function() {
2770-
if (xhr.status !== 200) return;
2770+
if (xhr.status !== 200) { stopAutoRefresh(); return; }
27712771
var data;
2772-
try { data = JSON.parse(xhr.responseText); } catch(e) { return; }
2772+
try { data = JSON.parse(xhr.responseText); } catch(e) { stopAutoRefresh(); return; }
27732773

27742774
// Update donut chart data
27752775
dataset = data.dataset;

0 commit comments

Comments
 (0)