From ee5fec149e1f07cbcf494f1a8100ec562300a385 Mon Sep 17 00:00:00 2001 From: printempw Date: Sat, 31 Dec 2016 14:05:55 +0800 Subject: [PATCH] fix saving option values whose id is formatted as *[*] --- app/Services/OptionForm.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Services/OptionForm.php b/app/Services/OptionForm.php index 2d3b138c..c3d7fd33 100644 --- a/app/Services/OptionForm.php +++ b/app/Services/OptionForm.php @@ -219,8 +219,10 @@ class OptionForm // Str::is('*[*]', $item->id) if (false !== ($result = $this->parseIdWithOffset($item->id))) { - // push array option value to cache - $arrayOptionQueue[$result['id']][$result['offset']] = $_POST[$item->id]; + // Push array option value to cache. + // Values of post ids like *[*] is collected as arrays in $_POST + // automatically by Laravel. + $arrayOptionQueue[$result['id']] = $_POST[$result['id']]; continue; }