File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,21 @@ public function generate($obj = null) {
104104 $ recordObject = array_key_exists ('recordObj ' , $ arrayVariable ) ? $ obj ->arrayVariable ['recordObj ' ]['initialValue ' ] : "stdClass " ;
105105 $ obj ->lastRowData = $ obj ->rowData ;
106106 $ row = ( is_array ($ dbData ) || $ dbData instanceOf \ArrayAccess ) ? (isset ($ dbData [$ rowIndex ])) ? $ dbData [$ rowIndex ] : null : $ dbData ->fetchObject ($ recordObject );
107+ if (!is_object ($ row ) && is_array ($ row )) {
108+ $ row = (object )$ row ;
109+ }
107110 //echo $rowIndex;
111+ if (count ($ obj ->arrayGroup ) > 0 ) {
112+ foreach ($ obj ->arrayGroup as $ group ) {
113+ preg_match_all ("/F{(\w+)}/ " , $ group ->groupExpression , $ matchesF );
114+ $ groupExpression = $ matchesF [1 ][0 ];
115+ if ($ obj ->rowData ->$ groupExpression != $ row ->$ groupExpression && $ group ->groupFooter ) {
116+ $ groupFooter = new GroupFooter ($ group ->groupFooter );
117+ $ groupFooter ->generate (array ($ obj , $ obj ->rowData ));
118+ $ group ->resetVariables = 'true ' ;
119+ }
120+ }
121+ }
108122
109123 $ obj ->rowData = $ row ;
110124 $ obj ->variables_calculation ($ obj , $ row );
You can’t perform that action at this time.
0 commit comments