From 01ba64d8622413cef9be2e18e7d76c582a1d2cf2 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 5 Mar 2026 21:38:05 +0000
Subject: [PATCH 1/2] Initial plan
From 3f56211e56259b13c788a6567c1b39c4c6a1e1cb Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 5 Mar 2026 21:40:11 +0000
Subject: [PATCH 2/2] Fix undefined array key warnings in card-openswoole.phtml
and card-swoole.phtml
Use null coalescing operator (??) with 'disabled' fallback on all
preg_match result accesses to prevent "Undefined array key 1" warnings
when a regex pattern doesn't match the php --ri output.
Co-authored-by: tillkruss <665029+tillkruss@users.noreply.github.com>
---
web/card-openswoole.phtml | 14 +++++++-------
web/card-swoole.phtml | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/web/card-openswoole.phtml b/web/card-openswoole.phtml
index 2e74601..b96c91a 100644
--- a/web/card-openswoole.phtml
+++ b/web/card-openswoole.phtml
@@ -35,7 +35,7 @@
JSON support
- (.+)/m", $openswoole, $json); echo $json[1]; ?>
+ (.+)/m", $openswoole, $json); echo $json[1] ?? 'disabled'; ?>
@@ -43,7 +43,7 @@
HTTP2 support
- (.+)/m", $openswoole, $http2); echo $http2[1]; ?>
+ (.+)/m", $openswoole, $http2); echo $http2[1] ?? 'disabled'; ?>
@@ -51,7 +51,7 @@
OpenSSL support
- (.+)/m", $openswoole, $openssl); echo $openssl[1]; ?>
+ (.+)/m", $openswoole, $openssl); echo $openssl[1] ?? 'disabled'; ?>
@@ -59,7 +59,7 @@
Native cURL support
- (.+)/m", $openswoole, $curl); echo $curl[1]; ?>
+ (.+)/m", $openswoole, $curl); echo $curl[1] ?? 'disabled'; ?>
@@ -67,7 +67,7 @@
mysqlnd support
- (.+)/m", $openswoole, $mysqlnd); echo $mysqlnd[1]; ?>
+ (.+)/m", $openswoole, $mysqlnd); echo $mysqlnd[1] ?? 'disabled'; ?>
@@ -75,7 +75,7 @@
sockets support
- (.+)/m", $openswoole, $sockets); echo $sockets[1]; ?>
+ (.+)/m", $openswoole, $sockets); echo $sockets[1] ?? 'disabled'; ?>
@@ -83,7 +83,7 @@
postgres support
- (.+)/m", $openswoole, $postgres); echo $postgres[1]; ?>
+ (.+)/m", $openswoole, $postgres); echo $postgres[1] ?? 'disabled'; ?>
diff --git a/web/card-swoole.phtml b/web/card-swoole.phtml
index 3038af0..bf11934 100644
--- a/web/card-swoole.phtml
+++ b/web/card-swoole.phtml
@@ -35,7 +35,7 @@
JSON support
- (.+)/m", $swoole, $json); echo $json[1]; ?>
+ (.+)/m", $swoole, $json); echo $json[1] ?? 'disabled'; ?>
@@ -43,7 +43,7 @@
HTTP2 support
- (.+)/m", $swoole, $http2); echo $http2[1]; ?>
+ (.+)/m", $swoole, $http2); echo $http2[1] ?? 'disabled'; ?>
@@ -51,7 +51,7 @@
OpenSSL support
- (.+)/m", $swoole, $openssl); echo $openssl[1]; ?>
+ (.+)/m", $swoole, $openssl); echo $openssl[1] ?? 'disabled'; ?>
@@ -59,7 +59,7 @@
Native cURL support
- (.+)/m", $swoole, $curl); echo $curl[1]; ?>
+ (.+)/m", $swoole, $curl); echo $curl[1] ?? 'disabled'; ?>
@@ -67,7 +67,7 @@
mysqlnd support
- (.+)/m", $swoole, $mysqlnd); echo $mysqlnd[1]; ?>
+ (.+)/m", $swoole, $mysqlnd); echo $mysqlnd[1] ?? 'disabled'; ?>
@@ -75,7 +75,7 @@
sockets support
- (.+)/m", $swoole, $sockets); echo $sockets[1]; ?>
+ (.+)/m", $swoole, $sockets); echo $sockets[1] ?? 'disabled'; ?>