Skip to content

Commit 7322723

Browse files
committedMay 30, 2023
fix conflict
2 parents 7014df3 + d4c62cc commit 7322723

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed
 

‎src/Illuminate/Queue/InvalidPayloadException.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,24 @@
66

77
class InvalidPayloadException extends InvalidArgumentException
88
{
9+
/**
10+
* The value that failed to decode.
11+
*
12+
* @var mixed
13+
*/
14+
public $value;
15+
916
/**
1017
* Create a new exception instance.
1118
*
1219
* @param string|null $message
20+
* @param mixed $value
1321
* @return void
1422
*/
15-
public function __construct($message = null)
23+
public function __construct($message = null, $value = null)
1624
{
1725
parent::__construct($message ?: json_last_error());
26+
27+
$this->value = $value;
1828
}
1929
}

‎src/Illuminate/Queue/Queue.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ protected function createPayload($job, $queue, $data = '')
102102
$job = CallQueuedClosure::create($job);
103103
}
104104

105-
$payload = json_encode($this->createPayloadArray($job, $queue, $data), \JSON_UNESCAPED_UNICODE);
105+
$payload = json_encode($value = $this->createPayloadArray($job, $queue, $data), \JSON_UNESCAPED_UNICODE);
106106

107107
if (json_last_error() !== JSON_ERROR_NONE) {
108108
throw new InvalidPayloadException(
109-
'Unable to JSON encode payload. Error code: '.json_last_error()
109+
'Unable to JSON encode payload. Error code: '.json_last_error(), $value
110110
);
111111
}
112112

0 commit comments

Comments
 (0)