fix: crash when a string is passed for the topics parameter of the mercure_publish() function (#2021)

This commit is contained in:
Kévin Dunglas
2025-11-23 17:03:43 +01:00
committed by GitHub
parent c6cadf3bf6
commit 911e6d156b
5 changed files with 50 additions and 7 deletions

1
testdata/flush.php vendored
View File

@@ -1,6 +1,5 @@
<?php
require_once __DIR__.'/_executor.php';
return function () {

8
testdata/mercure-publish.php vendored Normal file
View File

@@ -0,0 +1,8 @@
<?php
require_once __DIR__.'/_executor.php';
return function () {
echo "update 1: " . mercure_publish('foo', 'bar', true, 'myid', 'mytype', 10) . PHP_EOL;
echo "update 2: " . mercure_publish(['baz', 'bar']) . PHP_EOL;
};