06-14-2019, 02:37 AM,
|
|
daveparrish
Senior Member
|
Posts: 140
Threads: 63
Joined: Mar 2015
|
|
RE: php 7 issue
(06-14-2019, 01:25 AM)falkoner Wrote: Hmmm, this seems strange. I have been running PHP 7 for a long time now.
Have you tried changing the theme, in case it is a css problem?
Tim
Here is the error
Fatal error: Uncaught Error: [] operator not supported for strings in C:\inetpub\weberp\index.php:196 Stack trace: #0 C:\inetpub\weberp\index.php(141): GetRptLinks('gl') #1 {main} thrown in C:\inetpub\weberp\index.php on line 196
Here is that line
while ($Temp = DB_fetch_array($Result)) $ReportList[] = $Temp;
I am looking into the php.ini to see if there something there.
|
|
06-14-2019, 03:01 AM,
|
|
TimSchofield
Tim Schofield
|
Posts: 1,318
Threads: 22
Joined: Mar 2015
|
|
RE: php 7 issue
Ah yes, I do remember this now. Try changing that whole section to:
PHP Code: if (!isset($_SESSION['ReportList'])) { $SQL = "SELECT id, reporttype, defaultreport, groupname, reportname FROM reports ORDER BY groupname, reportname"; $Result = DB_query($SQL, '', '', false, true); $_SESSION['ReportList'] = array(); while ($Temp = DB_fetch_array($Result)) { $_SESSION['ReportList'][] = $Temp; } } $RptLinks = ''; for ($Def = 1;$Def >= 0;$Def--) { $RptLinks.= '<li class="menu_group_headers">'; $RptLinks.= '<b>' . $Title[$Def] . '</b>'; $RptLinks.= '</li>'; $NoEntries = true; if (isset($_SESSION['ReportList']['groupname']) and count($_SESSION['ReportList']['groupname']) > 0) { // then there are reports to show, show by grouping foreach ($_SESSION['ReportList'] as $Report) { if (isset($Report['groupname']) and $Report['groupname'] == $GroupID and $Report['defaultreport'] == $Def) { $RptLinks.= '<li class="menu_group_item">'; $RptLinks.= '<p><a href="' . $RootPath . '/reportwriter/ReportMaker.php?action=go&reportid=' . urlencode($Report['id']) . '">• ' . _($Report['reportname']) . '</a></p>'; $RptLinks.= '</li>'; $NoEntries = false; } } // now fetch the form groups that are a part of this group (List after reports) $NoForms = true; foreach ($_SESSION['ReportList'] as $Report) { $Group = explode(':', $Report['groupname']); // break into main group and form group array if ($NoForms and $Group[0] == $GroupID and $Report['reporttype'] == 'frm' and $Report['defaultreport'] == $Def) { $RptLinks.= '<li class="menu_group_item">'; $RptLinks.= '<img src="' . $RootPath . '/css/' . $_SESSION['Theme'] . '/images/folders.gif" width="16" height="13" alt="" /> '; $RptLinks.= '<a href="' . $RootPath . '/reportwriter/FormMaker.php?id=' . urlencode($Report['groupname']) . '">• '; $RptLinks.= $_SESSION['FormGroups'][$Report['groupname']] . '</a>'; $RptLinks.= '</li>'; $NoForms = false; $NoEntries = false; } } } if ($NoEntries) $RptLinks.= '<li class="menu_group_item">' . _('There are no reports to show!') . '</li>'; }
|
|
06-14-2019, 04:09 AM,
|
|
daveparrish
Senior Member
|
Posts: 140
Threads: 63
Joined: Mar 2015
|
|
RE: php 7 issue
(06-14-2019, 03:01 AM)falkoner Wrote: Ah yes, I do remember this now. Try changing that whole section to:
PHP Code: if (!isset($_SESSION['ReportList'])) { $SQL = "SELECT id, reporttype, defaultreport, groupname, reportname FROM reports ORDER BY groupname, reportname"; $Result = DB_query($SQL, '', '', false, true); $_SESSION['ReportList'] = array(); while ($Temp = DB_fetch_array($Result)) { $_SESSION['ReportList'][] = $Temp; } } $RptLinks = ''; for ($Def = 1;$Def >= 0;$Def--) { $RptLinks.= '<li class="menu_group_headers">'; $RptLinks.= '<b>' . $Title[$Def] . '</b>'; $RptLinks.= '</li>'; $NoEntries = true; if (isset($_SESSION['ReportList']['groupname']) and count($_SESSION['ReportList']['groupname']) > 0) { // then there are reports to show, show by grouping foreach ($_SESSION['ReportList'] as $Report) { if (isset($Report['groupname']) and $Report['groupname'] == $GroupID and $Report['defaultreport'] == $Def) { $RptLinks.= '<li class="menu_group_item">'; $RptLinks.= '<p><a href="' . $RootPath . '/reportwriter/ReportMaker.php?action=go&reportid=' . urlencode($Report['id']) . '">• ' . _($Report['reportname']) . '</a></p>'; $RptLinks.= '</li>'; $NoEntries = false; } } // now fetch the form groups that are a part of this group (List after reports) $NoForms = true; foreach ($_SESSION['ReportList'] as $Report) { $Group = explode(':', $Report['groupname']); // break into main group and form group array if ($NoForms and $Group[0] == $GroupID and $Report['reporttype'] == 'frm' and $Report['defaultreport'] == $Def) { $RptLinks.= '<li class="menu_group_item">'; $RptLinks.= '<img src="' . $RootPath . '/css/' . $_SESSION['Theme'] . '/images/folders.gif" width="16" height="13" alt="" /> '; $RptLinks.= '<a href="' . $RootPath . '/reportwriter/FormMaker.php?id=' . urlencode($Report['groupname']) . '">• '; $RptLinks.= $_SESSION['FormGroups'][$Report['groupname']] . '</a>'; $RptLinks.= '</li>'; $NoForms = false; $NoEntries = false; } } } if ($NoEntries) $RptLinks.= '<li class="menu_group_item">' . _('There are no reports to show!') . '</li>'; }
That did the trick
Thanks for all the help
|
|
|