Commit 4a228f5ade37bb88b75dc56ebe2ae8a511ff803d
1 parent
9d390cb0
Exists in
master
and in
1 other branch
Ajuste dos itens 11004 e 11005
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
rn/MdWsSeiDocumentoRN.php
... | ... | @@ -374,6 +374,10 @@ class MdWsSeiDocumentoRN extends DocumentoRN { |
374 | 374 | $protocoloRN = new ProtocoloRN(); |
375 | 375 | $retProtoculoDTO = $protocoloRN->consultarRN0186($protocoloDTOauxiliar); |
376 | 376 | |
377 | + if(empty($retProtoculoDTO)){ | |
378 | + throw new InfraException('Documento não encontrado.'); | |
379 | + } | |
380 | + | |
377 | 381 | if($retProtoculoDTO->getStrStaProtocolo() != ProtocoloRN::$TP_DOCUMENTO_RECEBIDO){ |
378 | 382 | throw new InfraException('A alteração deve ser apenas de documentos externos.'); |
379 | 383 | } |
... | ... | @@ -544,6 +548,10 @@ class MdWsSeiDocumentoRN extends DocumentoRN { |
544 | 548 | $protocoloRN = new ProtocoloRN(); |
545 | 549 | $retProtoculoDTO = $protocoloRN->consultarRN0186($protocoloDTOauxiliar); |
546 | 550 | |
551 | + if(empty($retProtoculoDTO)){ | |
552 | + throw new InfraException('Documento não encontrado.'); | |
553 | + } | |
554 | + | |
547 | 555 | if($retProtoculoDTO->getStrStaProtocolo() != ProtocoloRN::$TP_DOCUMENTO_GERADO){ |
548 | 556 | throw new InfraException('A alteração deve ser apenas de documentos internos.'); |
549 | 557 | } | ... | ... |