From 4da713ae56ef2b2a41aa2783aa5b5e1bd301db5d Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Mon, 28 Jul 2025 22:57:45 -0400 Subject: [PATCH] remove problematic debug echos that screw up login (output before header call) --- .../mocha-php/lib/mocha/oms/HttpOmsClient.inc.php | 15 +++++++++------ .../mocha/ui/renderers/html/HTMLRenderer2.inc.php | 1 - 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php b/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php index e71d7e0..bbe93e8 100644 --- a/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php +++ b/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php @@ -361,8 +361,6 @@ public function getResponse($element, InstanceReference|null $relatedInstance = null) // , array|null $workData = null) { $url = "/tenants/" . $this->getTenantName() . "/instances/" . $element->InstanceKey . "/element"; - echo ("getResponse (' " . $url . " ');
"); - if ($relatedInstance !== null) { // related instance is passed in by: @@ -421,10 +419,15 @@ public function processElement(InstanceReference $element, array $values) : array { $url = "/tenants/" . $this->getTenantName() . "/instances/" . $element->GlobalIdentifier . "/element"; - echo ("

POST " . $url . "
Values:
"); - echo ("

"); - print_r($values); - echo ("

"); + + $debug = false; + if ($debug) { + // !!! this will screw up login, use sparingly !!! + echo ("

POST " . $url . "
Values:
"); + echo ("

"); + print_r($values); + echo ("

"); + } $result = $this->curl_request_json($url, HttpRequestMethod::POST, $values); return $result; } diff --git a/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer2.inc.php b/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer2.inc.php index 2960a7a..23a7c8a 100644 --- a/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer2.inc.php +++ b/mocha-php/src/mocha-php/lib/mocha/ui/renderers/html/HTMLRenderer2.inc.php @@ -46,7 +46,6 @@ //*** DO NOT DELETE, WE STILL USE THIS FOR LOGIN ***// if (is_callable($this->ProcessPostbackFunction)) { - echo ("calling user function"); // call user-defined ProcessPostbackFunction return call_user_func($this->ProcessPostbackFunction, $this, $element, $array); }