<div dir="ltr">The bug 

<span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:13px">happened when <span style="background-color:rgb(255,255,255)">you try to export table report and the secondary module is empty' you get white page (error 500).</span></span><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:13px">As I  found  its cas</span><font color="#000000"><span style="font-family:"lucida grande","Lucida Sans Unicode",tahoma,sans-serif;font-size:13px">e by the </span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">function</span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre"> </span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">checkReportModulePermission file: </span>modules/</font>Rep</span>orts/views/ExportReport.php</div><div><span style="background-color:rgb(255,255,255)"><font color="#000000">the array <span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">secondaryModules get empty string and then in the </span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">getInstance function we get an error.</span></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="background-color:rgb(255,255,255)"><font color="#000000"><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">I solve this in by add  </span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">if</span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">(!</span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">$checkModule</span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">){</span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre"> </span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">continue</span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">; </span><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre">} in the foreach.</span></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000">I whold like to knew if I done samting wrong that can case my a different issue and I will happy if it's a core bug If same one can open a ticket to fix this issue in the next version.</font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000">thank you,</font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000">omri</font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000"><br></font></span></div><div><span style="font-family:Consolas,"Courier New",monospace;font-size:14px;white-space:pre;background-color:rgb(255,255,255)"><font color="#000000">all function now is:</font></span></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">function</span> <span style="color:rgb(220,220,170)">checkReportModulePermission</span>(<span style="color:rgb(86,156,214)">Vtiger_Request</span> <span style="color:rgb(156,220,254)">$request</span>){</div><div>        <span style="color:rgb(156,220,254)">$viewer</span> = <span style="color:rgb(86,156,214)">$this</span>-><span style="color:rgb(220,220,170)">getViewer</span>(<span style="color:rgb(156,220,254)">$request</span>);</div><div>        <span style="color:rgb(156,220,254)">$recordId</span> = <span style="color:rgb(156,220,254)">$request</span>-><span style="color:rgb(220,220,170)">get</span>(<span style="color:rgb(206,145,120)">'record'</span>);</div><div>        <span style="color:rgb(156,220,254)">$reportModel</span> = <span style="color:rgb(78,201,176)">Reports_Record_Model</span>::<span style="color:rgb(220,220,170)">getInstanceById</span>(<span style="color:rgb(156,220,254)">$recordId</span>);</div><div>        <span style="color:rgb(156,220,254)">$primaryModule</span> = <span style="color:rgb(156,220,254)">$reportModel</span>-><span style="color:rgb(220,220,170)">getPrimaryModule</span>();</div><div>        <span style="color:rgb(156,220,254)">$secondaryModules</span> = <span style="color:rgb(156,220,254)">$reportModel</span>-><span style="color:rgb(220,220,170)">getSecondaryModules</span>();</div><div>        <span style="color:rgb(156,220,254)">$modulesList</span> = <span style="color:rgb(220,220,170)">array</span>(<span style="color:rgb(156,220,254)">$primaryModule</span>);</div><div>        <span style="color:rgb(197,134,192)">if</span>(<span style="color:rgb(220,220,170)">stripos</span>(<span style="color:rgb(156,220,254)">$secondaryModules</span>, <span style="color:rgb(206,145,120)">':'</span>) >= <span style="color:rgb(181,206,168)">0</span>){</div><div>            <span style="color:rgb(156,220,254)">$secmodules</span> = <span style="color:rgb(220,220,170)">split</span>(<span style="color:rgb(206,145,120)">':'</span>, <span style="color:rgb(156,220,254)">$secondaryModules</span>);</div><div>            <span style="color:rgb(156,220,254)">$modulesList</span> = <span style="color:rgb(220,220,170)">array_merge</span>(<span style="color:rgb(156,220,254)">$modulesList</span>, <span style="color:rgb(156,220,254)">$secmodules</span>);</div><div>        }<span style="color:rgb(197,134,192)">else</span>{</div><div>            <span style="color:rgb(220,220,170)">array_push</span>(<span style="color:rgb(156,220,254)">$modulesList</span>, <span style="color:rgb(156,220,254)">$secondaryModules</span>);</div><div>        }</div><div>        <span style="color:rgb(156,220,254)">$currentUser</span> = <span style="color:rgb(78,201,176)">Users_Record_Model</span>::<span style="color:rgb(220,220,170)">getCurrentUserModel</span>();</div><div>        <span style="color:rgb(156,220,254)">$userPrivilegesModel</span> = <span style="color:rgb(78,201,176)">Users_Privileges_Model</span>::<span style="color:rgb(220,220,170)">getInstanceById</span>(<span style="color:rgb(156,220,254)">$currentUser</span>-><span style="color:rgb(220,220,170)">getId</span>());</div><div>        <span style="color:rgb(197,134,192)">foreach</span> (<span style="color:rgb(156,220,254)">$modulesList</span> as <span style="color:rgb(156,220,254)">$checkModule</span>) {</div><div>            <span style="color:rgb(106,153,85)">//Jira ticket DEVT-3640 - Fix a Bug that export report with not Secondary Modules get white page (error 500)</span></div><div>            <span style="color:rgb(197,134,192)">if</span>(!<span style="color:rgb(156,220,254)">$checkModule</span>){</div><div>                <span style="color:rgb(197,134,192)">continue</span>;</div><div>            }</div><div>            <span style="color:rgb(106,153,85)">//End fix Jira ticket DEVT-3640</span></div><div>            <span style="color:rgb(156,220,254)">$moduleInstance</span> = <span style="color:rgb(78,201,176)">Vtiger_Module_Model</span>::<span style="color:rgb(220,220,170)">getInstance</span>(<span style="color:rgb(156,220,254)">$checkModule</span>);</div><div>            <span style="color:rgb(156,220,254)">$permission</span> = <span style="color:rgb(156,220,254)">$userPrivilegesModel</span>-><span style="color:rgb(220,220,170)">hasModulePermission</span>(<span style="color:rgb(156,220,254)">$moduleInstance</span>-><span style="color:rgb(220,220,170)">getId</span>());</div><div>            <span style="color:rgb(197,134,192)">if</span>(!<span style="color:rgb(156,220,254)">$permission</span>) {</div><div>                <span style="color:rgb(156,220,254)">$viewer</span>-><span style="color:rgb(220,220,170)">assign</span>(<span style="color:rgb(206,145,120)">'MODULE'</span>, <span style="color:rgb(156,220,254)">$primaryModule</span>);</div><div>                <span style="color:rgb(156,220,254)">$viewer</span>-><span style="color:rgb(220,220,170)">assign</span>(<span style="color:rgb(206,145,120)">'MESSAGE'</span>, <span style="color:rgb(220,220,170)">vtranslate</span>(<span style="color:rgb(206,145,120)">'LBL_PERMISSION_DENIED'</span>));</div><div>                <span style="color:rgb(156,220,254)">$viewer</span>-><span style="color:rgb(220,220,170)">view</span>(<span style="color:rgb(206,145,120)">'OperationNotPermitted.tpl'</span>, <span style="color:rgb(156,220,254)">$primaryModule</span>);</div><div>                <span style="color:rgb(197,134,192)">exit</span>;</div><div>            }</div><div>        }</div><div>    }</div></div></div></div>