[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Tiki Monitor: minor fixes

"Domeshow Emmanuel \(@Domeshow\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68cb1aae3ceaa_2cdeb34975c0@gitlab-sidekiq-low-urgency-cpu-bound-v2-757fcbb555-9ltgx.mail>

Domeshow Emmanuel pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
4440cb8d by Domeshow Emmanuel at 2025-09-17T23:23:39+03:00
[FIX] Tiki Monitor: minor fixes
---
* [FIX] Tiki Monitor: minor fixes

See merge request tikiwiki/tiki!8584

- - - - -


1 changed file:

- tiki-monitor.php


Changes:

=====================================
tiki-monitor.php
=====================================
@@ -19,7 +19,7 @@ $opcode_stats = TikiLib::lib('admin')->getOpcodeCacheStatus();
 # admin/include_performance.php
 $txtUsed = tr('Used');
 $txtAvailable = tr('Available');
-if ($opcode_cache == 'WinCache') {
+if (isset($opcode_cache) && $opcode_cache == 'WinCache') {
     // Somehow WinCache seems to flip the representations
     $txtAvailable = tr('Used');
     $txtUsed = tr('Available');
@@ -67,15 +67,15 @@ if (! empty($probes)) {
 // Always check the monitoring_error_code parameter or header, regardless of probes
 $monitoringErrorCode = (int) getRequestParam('monitoring_error_code', 'X-Tiki-Monitoring-Error-Code');
 
-if ($probes['result'] === 'FAIL' && $monitoringErrorCode >= 200 && $monitoringErrorCode < 600) {
+if (isset($probes['result']) && $probes['result'] === 'FAIL' && $monitoringErrorCode >= 200 && $monitoringErrorCode < 600) {
     http_response_code($monitoringErrorCode);
     if ($_SERVER['REQUEST_METHOD'] === 'HEAD') {
         exit();
     }
 }
 
-$display = json_encode($result);
-echo $display;
+header('Content-Type: application/json');
+echo json_encode($result);
 
 /**
  * Check monitor is restricted by IP



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/4440cb8d20556c57a7f4522bac7d5f22ab59d65c

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/4440cb8d20556c57a7f4522bac7d5f22ab59d65c
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.