Dominique Leuenberger
6bc612ab67
Add upstream bug fixes OBS-URL: https://build.opensuse.org/request/show/600988 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libsoup?expand=0&rev=210
36 lines
1.0 KiB
Diff
36 lines
1.0 KiB
Diff
From 45526b6b26a118ff7d91d587e89fff779b2a97a0 Mon Sep 17 00:00:00 2001
|
|
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
|
Date: Thu, 11 Jan 2018 20:22:58 +0100
|
|
Subject: xmlrpc-server.php: Don't try to count NULL params
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Trying to count something uncountable causes PHP ≥7.2 to emit a warning
|
|
before returning zero.
|
|
|
|
I assume that the ping() function's $params is NULL when there are no
|
|
parameters.
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=795111
|
|
---
|
|
tests/xmlrpc-server.php | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/tests/xmlrpc-server.php b/tests/xmlrpc-server.php
|
|
index 4025f95..f315b6d 100644
|
|
--- a/tests/xmlrpc-server.php
|
|
+++ b/tests/xmlrpc-server.php
|
|
@@ -71,7 +71,7 @@ function echo_ ($method_name, $params, $app_data)
|
|
|
|
function ping ($method_name, $params, $app_data)
|
|
{
|
|
- if (count ($params) == 0)
|
|
+ if (is_null ($params) or count ($params) == 0)
|
|
return "pong";
|
|
else
|
|
return paramfault ();
|
|
--
|
|
cgit v0.12
|
|
|