File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,16 @@ protected function renderNode(NestedValue $node)
89
89
*/
90
90
protected function renderListItem ($ resultrow , $ depth , $ showEmpty = false )
91
91
{
92
- $ sepbyheaders = $ this ->searchConfig ->getConf ()['sepbyheaders ' ];
93
- $ headers = $ this ->searchConfig ->getConf ()['headers ' ];
92
+ $ config = $ this ->searchConfig ->getConf ();
93
+ $ sepbyheaders = $ config ['sepbyheaders ' ];
94
+ $ headers = $ config ['headers ' ];
94
95
95
96
foreach ($ resultrow as $ index => $ value ) {
96
- $ column = $ index + $ depth ; // the resultrow is shifted by the nesting depth
97
+ // when nesting, the resultrow is shifted by the nesting depth
98
+ $ column = $ index ;
99
+ if ($ config ['nesting ' ]) {
100
+ $ column += $ depth ;
101
+ }
97
102
if ($ sepbyheaders && !empty ($ headers [$ column ])) {
98
103
$ header = $ headers [$ column ];
99
104
} else {
Original file line number Diff line number Diff line change @@ -279,14 +279,14 @@ protected function parseValues($line)
279
279
$ value = '' ;
280
280
$ len = strlen ($ line );
281
281
for ($ i = 0 ; $ i < $ len ; $ i ++) {
282
- if ($ line [$ i ] == '" ' ) {
282
+ if ($ line [$ i ] === '" ' ) {
283
283
if ($ inQuote ) {
284
284
if ($ escapedQuote ) {
285
285
$ value .= '" ' ;
286
286
$ escapedQuote = false ;
287
287
continue ;
288
288
}
289
- if ($ line [$ i + 1 ] == '" ' ) {
289
+ if (isset ( $ line [$ i + 1 ]) && $ line [ $ i + 1 ] = == '" ' ) {
290
290
$ escapedQuote = true ;
291
291
continue ;
292
292
}
@@ -299,7 +299,7 @@ protected function parseValues($line)
299
299
$ value = '' ; //don't store stuff before the opening quote
300
300
continue ;
301
301
}
302
- } elseif ($ line [$ i ] == ', ' ) {
302
+ } elseif ($ line [$ i ] === ', ' ) {
303
303
if ($ inQuote ) {
304
304
$ value .= ', ' ;
305
305
continue ;
You can’t perform that action at this time.
0 commit comments