CD
Erro ao gerar relatório em Excel
Pessoal, estou gerando relatório em excel, e quando executo, o relatório é gerado, mas dá um warning abaixo
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:xampphtdocsocorrenciasvendorpablodallogliooleOLE.php on line 314
Alguém já se deparou com isso?
Trecho da função do Pablo
"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:xampphtdocsocorrenciasvendorpablodallogliooleOLE.php on line 314
Alguém já se deparou com isso?
Trecho da função do Pablo
- <?php
- function _readPpsWks($blockId)
- {
- $fh = $this->getStream($blockId);
- for ($pos = 0; ; $pos += 128) {
- fseek($fh, $pos, SEEK_SET);
- $nameUtf16 = fread($fh, 64);
- $nameLength = $this->_readInt2($fh);
- $nameUtf16 = substr($nameUtf16, 0, $nameLength - 2);
- // Simple conversion from UTF-16LE to ISO-8859-1
- $name = str_replace("\x00", "", $nameUtf16);
- $type = $this->_readInt1($fh);
- switch ($type) {
- case OLE_PPS_TYPE_ROOT:
- $pps = new OLE_PPS_Root(null, null, array());
- $this->root = $pps;
- break;
- case OLE_PPS_TYPE_DIR:
- $pps = new OLE_PPS(null, null, null, null, null,
- null, null, null, null, array());
- break;
- case OLE_PPS_TYPE_FILE:
- $pps = new OLE_PPS_File($name);
- break;
- default:
- continue; //////////////////////////// o erro indica nessa linha
- }
- fseek($fh, 1, SEEK_CUR);
- $pps->Type = $type;
- $pps->Name = $name;
- $pps->PrevPps = $this->_readInt4($fh);
- $pps->NextPps = $this->_readInt4($fh);
- $pps->DirPps = $this->_readInt4($fh);
- fseek($fh, 20, SEEK_CUR);
- $pps->Time1st = OLE::OLE2LocalDate(fread($fh, 8));
- $pps->Time2nd = OLE::OLE2LocalDate(fread($fh, 8));
- $pps->_StartBlock = $this->_readInt4($fh);
- $pps->Size = $this->_readInt4($fh);
- $pps->No = count($this->_list);
- $this->_list[] = $pps;
- // check if the PPS tree (starting from root) is complete
- if (isset($this->root) &&
- $this->_ppsTreeComplete($this->root->No)) {
- break;
- }
- }
- fclose($fh);
- // Initialize $pps->children on directories
- foreach ($this->_list as $pps) {
- if ($pps->Type == OLE_PPS_TYPE_DIR || $pps->Type == OLE_PPS_TYPE_ROOT) {
- $nos = array($pps->DirPps);
- $pps->children = array();
- while ($nos) {
- $no = array_pop($nos);
- if ($no != -1) {
- $childPps = $this->_list[$no];
- $nos[] = $childPps->PrevPps;
- $nos[] = $childPps->NextPps;
- $pps->children[] = $childPps;
- }
- }
- }
- }
- return true;
- }
- ?>
Também estou com o mesmo problema.
Corrigi o problema.
Abra o arquivo vendor/pablodalloglio/ole/OLE.php
Na linha 314,
substitua: continue;
por: continue 2;
Fica a dica pra melhoria na próxima versão do framework.