Skip to content

http事件下swoole 与原生Exception 序列化 冲突 #5496

@LIngMax

Description

@LIngMax

Please answer these questions before submitting your issue.

var_dump(serialize(new Exception("fasfasdfad")));#普通环境下执行正常

#http事件下swoole  抛出异常 is not allowed 
$server->on('request', function ($request, $response){serialize(new Exception("fasfasdfad"));@$response->end("啊哈哈哈哈");});


一旦放到 http事件下 马上抛出异常

Serialization of 'Swoole\Http\Request' is not allowed 

swoole扩展不支持序列化的对象  

不可序列化输出警告/不可序列化不输出警告/不可序列化抛出异常

 由开发者控制这样?

  1. What did you do? If possible, provide a simple script for reproducing the error.

Serialization of 'Swoole\Http\Request' is not allowed

  1. What version of Swoole are you using (show your php --ri swoole)?
    5.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions