Skip to content

Commit 1f212b6

Browse files
Copilottillkruss
andauthored
Fix undefined array key warnings in openswoole/swoole card templates (#39)
Co-authored-by: tillkruss <665029+tillkruss@users.noreply.github.com>
1 parent c267a34 commit 1f212b6

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

web/card-openswoole.phtml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,55 +35,55 @@
3535
JSON support
3636
</dt>
3737
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
38-
<?php preg_match("/^json => (.+)/m", $openswoole, $json); echo $json[1]; ?>
38+
<?php preg_match("/^json => (.+)/m", $openswoole, $json); echo $json[1] ?? 'disabled'; ?>
3939
</dd>
4040
</div>
4141
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
4242
<dt class="text-sm font-medium text-gray-500">
4343
HTTP2 support
4444
</dt>
4545
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
46-
<?php preg_match("/^http2 => (.+)/m", $openswoole, $http2); echo $http2[1]; ?>
46+
<?php preg_match("/^http2 => (.+)/m", $openswoole, $http2); echo $http2[1] ?? 'disabled'; ?>
4747
</dd>
4848
</div>
4949
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
5050
<dt class="text-sm font-medium text-gray-500">
5151
OpenSSL support
5252
</dt>
5353
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
54-
<?php preg_match("/^openssl => (.+)/m", $openswoole, $openssl); echo $openssl[1]; ?>
54+
<?php preg_match("/^openssl => (.+)/m", $openswoole, $openssl); echo $openssl[1] ?? 'disabled'; ?>
5555
</dd>
5656
</div>
5757
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
5858
<dt class="text-sm font-medium text-gray-500">
5959
Native cURL support
6060
</dt>
6161
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
62-
<?php preg_match("/^curl-native => (.+)/m", $openswoole, $curl); echo $curl[1]; ?>
62+
<?php preg_match("/^curl-native => (.+)/m", $openswoole, $curl); echo $curl[1] ?? 'disabled'; ?>
6363
</dd>
6464
</div>
6565
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
6666
<dt class="text-sm font-medium text-gray-500">
6767
mysqlnd support
6868
</dt>
6969
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
70-
<?php preg_match("/^mysqlnd => (.+)/m", $openswoole, $mysqlnd); echo $mysqlnd[1]; ?>
70+
<?php preg_match("/^mysqlnd => (.+)/m", $openswoole, $mysqlnd); echo $mysqlnd[1] ?? 'disabled'; ?>
7171
</dd>
7272
</div>
7373
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
7474
<dt class="text-sm font-medium text-gray-500">
7575
sockets support
7676
</dt>
7777
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
78-
<?php preg_match("/^sockets => (.+)/m", $openswoole, $sockets); echo $sockets[1]; ?>
78+
<?php preg_match("/^sockets => (.+)/m", $openswoole, $sockets); echo $sockets[1] ?? 'disabled'; ?>
7979
</dd>
8080
</div>
8181
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
8282
<dt class="text-sm font-medium text-gray-500">
8383
postgres support
8484
</dt>
8585
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
86-
<?php preg_match("/^postgres => (.+)/m", $openswoole, $postgres); echo $postgres[1]; ?>
86+
<?php preg_match("/^postgres => (.+)/m", $openswoole, $postgres); echo $postgres[1] ?? 'disabled'; ?>
8787
</dd>
8888
</div>
8989
<?php endif; ?>

web/card-swoole.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,47 +35,47 @@
3535
JSON support
3636
</dt>
3737
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
38-
<?php preg_match("/^json => (.+)/m", $swoole, $json); echo $json[1]; ?>
38+
<?php preg_match("/^json => (.+)/m", $swoole, $json); echo $json[1] ?? 'disabled'; ?>
3939
</dd>
4040
</div>
4141
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
4242
<dt class="text-sm font-medium text-gray-500">
4343
HTTP2 support
4444
</dt>
4545
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
46-
<?php preg_match("/^http2 => (.+)/m", $swoole, $http2); echo $http2[1]; ?>
46+
<?php preg_match("/^http2 => (.+)/m", $swoole, $http2); echo $http2[1] ?? 'disabled'; ?>
4747
</dd>
4848
</div>
4949
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
5050
<dt class="text-sm font-medium text-gray-500">
5151
OpenSSL support
5252
</dt>
5353
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
54-
<?php preg_match("/^openssl => (.+)/m", $swoole, $openssl); echo $openssl[1]; ?>
54+
<?php preg_match("/^openssl => (.+)/m", $swoole, $openssl); echo $openssl[1] ?? 'disabled'; ?>
5555
</dd>
5656
</div>
5757
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
5858
<dt class="text-sm font-medium text-gray-500">
5959
Native cURL support
6060
</dt>
6161
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
62-
<?php preg_match("/^curl-native => (.+)/m", $swoole, $curl); echo $curl[1]; ?>
62+
<?php preg_match("/^curl-native => (.+)/m", $swoole, $curl); echo $curl[1] ?? 'disabled'; ?>
6363
</dd>
6464
</div>
6565
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
6666
<dt class="text-sm font-medium text-gray-500">
6767
mysqlnd support
6868
</dt>
6969
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
70-
<?php preg_match("/^mysqlnd => (.+)/m", $swoole, $mysqlnd); echo $mysqlnd[1]; ?>
70+
<?php preg_match("/^mysqlnd => (.+)/m", $swoole, $mysqlnd); echo $mysqlnd[1] ?? 'disabled'; ?>
7171
</dd>
7272
</div>
7373
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
7474
<dt class="text-sm font-medium text-gray-500">
7575
sockets support
7676
</dt>
7777
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
78-
<?php preg_match("/^sockets => (.+)/m", $swoole, $sockets); echo $sockets[1]; ?>
78+
<?php preg_match("/^sockets => (.+)/m", $swoole, $sockets); echo $sockets[1] ?? 'disabled'; ?>
7979
</dd>
8080
</div>
8181
<?php endif; ?>

0 commit comments

Comments
 (0)