From ea78e125bd9e56082e5979c713f08174282e956e Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 19 Jul 2017 13:52:19 +1000 Subject: [PATCH 1/2] add exception message --- src/Illuminate/Queue/Queue.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/Queue.php b/src/Illuminate/Queue/Queue.php index c53dcf355392..437c6e93ee1c 100755 --- a/src/Illuminate/Queue/Queue.php +++ b/src/Illuminate/Queue/Queue.php @@ -86,7 +86,9 @@ protected function createPayload($job, $data = '', $queue = null) $payload = json_encode($this->createPayloadArray($job, $data, $queue)); if (JSON_ERROR_NONE !== json_last_error()) { - throw new InvalidPayloadException; + throw new InvalidPayloadException( + 'Unable to JSON encode payload. Error code: '.json_last_error() + ); } return $payload; From 2f4df509bbf7801b674d5a7df920f6e851300311 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 19 Jul 2017 07:44:50 -0500 Subject: [PATCH 2/2] Update Queue.php --- src/Illuminate/Queue/Queue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Queue/Queue.php b/src/Illuminate/Queue/Queue.php index 437c6e93ee1c..617532665b69 100755 --- a/src/Illuminate/Queue/Queue.php +++ b/src/Illuminate/Queue/Queue.php @@ -87,7 +87,7 @@ protected function createPayload($job, $data = '', $queue = null) if (JSON_ERROR_NONE !== json_last_error()) { throw new InvalidPayloadException( - 'Unable to JSON encode payload. Error code: '.json_last_error() + 'Unable to JSON encode payload. Error code: '.json_last_error() ); }