File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 186186 $ posizioni = $ module_query ? $ dbo ->fetchArray ($ module_query ) : 0 ;
187187 $ key = $ posizioni ? array_search ($ id_record , array_column ($ posizioni , 'id ' )) : 0 ;
188188
189- // Precedente
190- $ prev = $ posizioni [$ key - 1 ]['id ' ];
189+ if (is_array ($ posizioni )) {
190+ // Precedente
191+ $ prev = $ posizioni [$ key - 1 ]['id ' ];
191192
192- // Successivo
193- $ next = $ posizioni [$ key + 1 ]['id ' ];
193+ // Successivo
194+ $ next = $ posizioni [$ key + 1 ]['id ' ];
194195
195- echo '<span class="d-sm-inline"> ' ;
196+ echo '<span class="d-sm-inline"> ' ;
196197
197- echo '
198- <div class="btn-group">
199- <a class="btn btn-default ' .($ prev ? '' : ' disabled ' ).'" href=" ' .base_path ().'/editor.php?id_module= ' .$ id_module .'&id_record= ' .$ prev .'">
200- <i class="fa fa-arrow-circle-left"></i>
201- </a>
202- <span class="btn btn-default disabled"> ' .($ key + 1 ).'/ ' .count ($ posizioni ).'</span>
203- <a class="btn btn-default ' .($ next ? '' : ' disabled ' ).'" href=" ' .base_path ().'/editor.php?id_module= ' .$ id_module .'&id_record= ' .$ next .'">
204- <i class="fa fa-arrow-circle-right"></i>
205- </a>
206- </div>
207- </span> ' ;
198+ echo '
199+ <div class="btn-group">
200+ <a class="btn btn-default ' .($ prev ? '' : ' disabled ' ).'" href=" ' .base_path ().'/editor.php?id_module= ' .$ id_module .'&id_record= ' .$ prev .'">
201+ <i class="fa fa-arrow-circle-left"></i>
202+ </a>
203+ <span class="btn btn-default disabled"> ' .($ key + 1 ).'/ ' .count ($ posizioni ).'</span>
204+ <a class="btn btn-default ' .($ next ? '' : ' disabled ' ).'" href=" ' .base_path ().'/editor.php?id_module= ' .$ id_module .'&id_record= ' .$ next .'">
205+ <i class="fa fa-arrow-circle-right"></i>
206+ </a>
207+ </div>
208+ </span> ' ;
209+ }
208210
209211 echo '<div class="extra-buttons d-sm-inline"> ' ;
210212
You can’t perform that action at this time.
0 commit comments