Skip to content

Serializing exceptions causes fatal error when exception_ignore_args is disabled #7

@matthi4s

Description

@matthi4s

When throwing an exception in a task, the exception is serialized and sent back to the parent process. When exception_ignore_args is disabled, this exception also includes arguments that cannot and should not be serialized.

An error like this is thrown:

PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in vendor/aternos/taskmaster/src/Communication/Socket/Socket.php:46

(This error can also occur for other reasons)

You can check your current php.ini setting using

php -i | grep "exception_ignore_args"

For now, the easiest fix is to enable exception_ignore_args in your php.ini.

A better solution would be removing all args from exceptions when serializing in Taskmaster.

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