mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 07:34:35 -04:00
Coerce the string to array if empty string passed for design
This commit is contained in:
parent
1a5073bb0d
commit
2c83b4ee25
@ -39,6 +39,7 @@ class StoreDesignRequest extends Request
|
|||||||
public function prepareForValidation()
|
public function prepareForValidation()
|
||||||
{
|
{
|
||||||
$input = $this->all();
|
$input = $this->all();
|
||||||
|
$input['design'] = is_array($input['design']) ? $input['design'] : [];
|
||||||
|
|
||||||
if (! array_key_exists('product', $input['design']) || is_null($input['design']['product'])) {
|
if (! array_key_exists('product', $input['design']) || is_null($input['design']['product'])) {
|
||||||
$input['design']['product'] = '';
|
$input['design']['product'] = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user