mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
fix: update mercure_publish() to use the new GoPackedArray() API
This commit is contained in:
@@ -46,7 +46,7 @@ func go_mercure_publish(threadIndex C.uintptr_t, topics *C.struct__zval_struct,
|
||||
case C.IS_STRING:
|
||||
u.Topics = []string{GoString(unsafe.Pointer(*(**C.zend_string)(unsafe.Pointer(&topics.value[0]))))}
|
||||
case C.IS_ARRAY:
|
||||
ts, err := GoPackedArray[string](unsafe.Pointer(topics))
|
||||
ts, err := GoPackedArray[string](unsafe.Pointer(*(**C.zend_array)(unsafe.Pointer(&topics.value[0]))))
|
||||
if err != nil {
|
||||
if fc.logger.Enabled(ctx, slog.LevelError) {
|
||||
fc.logger.LogAttrs(ctx, slog.LevelError, "invalid topics type", slog.Any("error", err))
|
||||
|
||||
Reference in New Issue
Block a user