From 3f5606035ea7ef9862f98e141c93d9ca28b80795 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Mon, 17 Aug 2026 21:43:23 +0200 Subject: [PATCH] Handle direct XML payloads in connector runtime --- runtime/lib/piwigo-sync.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/runtime/lib/piwigo-sync.php b/runtime/lib/piwigo-sync.php index d7225b8..884884a 100644 --- a/runtime/lib/piwigo-sync.php +++ b/runtime/lib/piwigo-sync.php @@ -21,7 +21,7 @@ function http_request($url, array $fields, array $headers = array(), $cookie_fil CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 900, CURLOPT_FOLLOWLOCATION => false, - CURLOPT_USERAGENT => 'Bratonien-NC-Connector/0.9.3.18', + CURLOPT_USERAGENT => 'Bratonien-NC-Connector/0.9.3.19', ); if ($headers) { @@ -118,7 +118,14 @@ function decode_ws($body) $message = (string)($decoded['message'] ?? $decoded['err'] ?? 'Piwigo-Aufruf wurde abgelehnt.'); fail_sync($message); } - return $decoded['result'] ?? array(); + + if (array_key_exists('result', $decoded)) + { + return $decoded['result']; + } + + unset($decoded['stat']); + return $decoded; } function decrypt_blob($blob, $hex_key)