File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 77*
88* @package Laravel
99* @category Package
10- * @version 2.2.0
1110* @author Arjay Angeles <[email protected] > 1211*/
1312
@@ -112,7 +111,7 @@ private function getResult()
112111 $ this ->result_array = array_map (function ($ object ) { return (array ) $ object ; }, $ this ->result_object ->toArray ());
113112 }
114113 else {
115- $ this ->result_array = array_map (function ($ object ) { return (array ) $ object ; }, ( array ) $ this ->result_object );
114+ $ this ->result_array = array_map (function ($ object ) { return (array ) $ object ; }, $ this ->result_object );
116115 }
117116 }
118117
@@ -210,7 +209,12 @@ private function initColumns()
210209 // Convert data array to object value
211210 $ data = array ();
212211 foreach ($ rvalue as $ key => $ value ) {
213- $ data [$ key ] = $ this ->result_object [$ rkey ]->$ key ;
212+ if ( is_object ($ this ->result_object [$ rkey ]) ) {
213+ $ data [$ key ] = $ this ->result_object [$ rkey ]->$ key ;
214+ }
215+ else {
216+ $ data [$ key ] = $ value ;
217+ }
214218 }
215219
216220 // Process add columns
@@ -222,7 +226,7 @@ private function initColumns()
222226 $ value ['content ' ] = $ value ['content ' ]($ this ->result_object [$ rkey ]);
223227 endif ;
224228
225- $ rvalue = $ this ->includeInArray ($ value ,$ rvalue );
229+ $ rvalue = $ this ->includeInArray ($ value ,$ data );
226230 }
227231
228232 // Process edit columns
You can’t perform that action at this time.
0 commit comments