Lançado Adianti Framework 8.1!
Clique aqui para saber mais
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 ...
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

  1. <?php
  2.    function _readPpsWks($blockId)
  3.     {
  4.         $fh $this->getStream($blockId);
  5.         for ($pos 0; ; $pos += 128) {
  6.             fseek($fh$posSEEK_SET);
  7.             $nameUtf16 fread($fh64);
  8.             $nameLength $this->_readInt2($fh);
  9.             $nameUtf16 substr($nameUtf160$nameLength 2);
  10.             // Simple conversion from UTF-16LE to ISO-8859-1
  11.             $name str_replace("\x00"""$nameUtf16);
  12.             $type $this->_readInt1($fh);
  13.             switch ($type) {
  14.             case OLE_PPS_TYPE_ROOT:
  15.                 $pps = new OLE_PPS_Root(nullnull, array());
  16.                 $this->root $pps;
  17.                 break;
  18.             case OLE_PPS_TYPE_DIR:
  19.                 $pps = new OLE_PPS(nullnullnullnullnull,
  20.                                    nullnullnullnull, array());
  21.                 break;
  22.             case OLE_PPS_TYPE_FILE:
  23.                 $pps = new OLE_PPS_File($name);
  24.                 break;
  25.             default:
  26.                 continue; //////////////////////////// o erro indica nessa linha
  27.             }
  28.             fseek($fh1SEEK_CUR);
  29.             $pps->Type    $type;
  30.             $pps->Name    $name;
  31.             $pps->PrevPps $this->_readInt4($fh);
  32.             $pps->NextPps $this->_readInt4($fh);
  33.             $pps->DirPps  $this->_readInt4($fh);
  34.             fseek($fh20SEEK_CUR);
  35.             $pps->Time1st OLE::OLE2LocalDate(fread($fh8));
  36.             $pps->Time2nd OLE::OLE2LocalDate(fread($fh8));
  37.             $pps->_StartBlock $this->_readInt4($fh);
  38.             $pps->Size $this->_readInt4($fh);
  39.             $pps->No count($this->_list);
  40.             $this->_list[] = $pps;
  41.             // check if the PPS tree (starting from root) is complete
  42.             if (isset($this->root) &&
  43.                 $this->_ppsTreeComplete($this->root->No)) {
  44.                 break;
  45.             }
  46.         }
  47.         fclose($fh);
  48.         // Initialize $pps->children on directories
  49.         foreach ($this->_list as $pps) {
  50.             if ($pps->Type == OLE_PPS_TYPE_DIR || $pps->Type == OLE_PPS_TYPE_ROOT) {
  51.                 $nos = array($pps->DirPps);
  52.                 $pps->children = array();
  53.                 while ($nos) {
  54.                     $no array_pop($nos);
  55.                     if ($no != -1) {
  56.                         $childPps $this->_list[$no];
  57.                         $nos[] = $childPps->PrevPps;
  58.                         $nos[] = $childPps->NextPps;
  59.                         $pps->children[] = $childPps;
  60.                     }
  61.                 }
  62.             }
  63.         }
  64.         return true;
  65.     }
  66. ?>


Curso Dominando o Adianti Framework

O material mais completo de treinamento do Framework.
Curso em vídeo aulas + Livro completo + Códigos fontes do projeto ERPHouse.
Conteúdo Atualizado!


Dominando o Adianti Framework Quero me inscrever agora!

Comentários (2)


RC

Também estou com o mesmo problema.
RC

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.