Merge pull request #5508 from defrance/patch-14

fix : warning error if no graphfiles
This commit is contained in:
Laurent Destailleur 2016-07-20 18:06:04 +02:00 committed by GitHub
commit 366769e97c

View File

@ -244,7 +244,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
$px = new DolGraph(); $px = new DolGraph();
if (! $error) if (! $error && count($graphfiles)>0)
{ {
$mesg = $px->isGraphKo(); $mesg = $px->isGraphKo();
if (! $mesg) if (! $mesg)
@ -301,6 +301,8 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
// Show graphs // Show graphs
$i=0; $i=0;
if ( count($graphfiles)>0)
{
foreach($graphfiles as $key => $val) foreach($graphfiles as $key => $val)
{ {
if (! $graphfiles[$key]['file']) continue; if (! $graphfiles[$key]['file']) continue;
@ -360,6 +362,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
$i++; $i++;
} }
}
// div not closed // div not closed
if ($i % 2 == 1) if ($i % 2 == 1)
{ {