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 7
7
*
8
8
* @package Laravel
9
9
* @category Package
10
- * @version 2.2.0
11
10
* @author Arjay Angeles <[email protected] >
12
11
*/
13
12
@@ -112,7 +111,7 @@ private function getResult()
112
111
$ this ->result_array = array_map (function ($ object ) { return (array ) $ object ; }, $ this ->result_object ->toArray ());
113
112
}
114
113
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 );
116
115
}
117
116
}
118
117
@@ -210,7 +209,12 @@ private function initColumns()
210
209
// Convert data array to object value
211
210
$ data = array ();
212
211
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
+ }
214
218
}
215
219
216
220
// Process add columns
@@ -222,7 +226,7 @@ private function initColumns()
222
226
$ value ['content ' ] = $ value ['content ' ]($ this ->result_object [$ rkey ]);
223
227
endif ;
224
228
225
- $ rvalue = $ this ->includeInArray ($ value ,$ rvalue );
229
+ $ rvalue = $ this ->includeInArray ($ value ,$ data );
226
230
}
227
231
228
232
// Process edit columns
You can’t perform that action at this time.
0 commit comments