Skip to content

Arguments have other encodings than utf-8 #28

Open
@jvoges

Description

@jvoges

Jobs don't get queued when arguments have invalid (non utf-8) encoding. Also you get a valid ID.

Expected Behavior

\Resque::enqueue() should fail with a meaningful error message

Current Behavior

\Resque::enqueue() returns with a valid ID but there is no job in the Redis-DB.

Possible Solution

Throw an exception, when json_encode in Resque::push() fails and check return value when Resque::push() gets called in Job::create()

Steps to Reproduce

    Resque::enqueue('jobs', 'Test_Job', [
        'myStr' => utf8_decode('Düsseldorf'),
    ])

My Environment

  • PHP-Resque version: 1.3
  • PHP version: 7.2.24
  • Redis version: 2:3.0.6-1ubuntu0.4
  • Server type and version: php-cli
  • Operating System and version: 2:3.0.6-1ubuntu0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions