GithubHelp home page GithubHelp logo

Undefined index: cep about cnpj-gratis HOT 5 OPEN

jansenfelipe avatar jansenfelipe commented on August 19, 2024
Undefined index: cep

from cnpj-gratis.

Comments (5)

jansenfelipe avatar jansenfelipe commented on August 19, 2024 1

@lemoslincoln

Essa mensagem acontece pois o CEP não veio na resposta..

Efetue um teste antes de mascarar o "cep":

if(isset($return['cep']))
    $return['cep'] = Utils::mask($return['cep'], Mask::CEP);

from cnpj-gratis.

jansenfelipe avatar jansenfelipe commented on August 19, 2024 1

Pretendo atualizar a library para retornar um objeto (ao invés de um array). Vai resolver problemas assim

from cnpj-gratis.

mprandot avatar mprandot commented on August 19, 2024

@lemoslincoln provavelmente não está retornando o CEP na sua consulta. Tem que testar se existe esse índice antes de pegá-lo.
Edit :
Aconteceu a mesma coisa comigo. See #25

from cnpj-gratis.

lincolnlemos avatar lincolnlemos commented on August 19, 2024

@mprandot ,
Eu até tentei fazer isso, mas acredito que o erro está nessa linha abaixo.
$return = CnpjGratis::consulta($_POST['cnpj'], $_POST['captcha'], $_POST['cookie']);
Pois esse $return ai imprime um undefined...

from cnpj-gratis.

lincolnlemos avatar lincolnlemos commented on August 19, 2024

Legal @jansenfelipe Eu entendo pouco, mas quero aprofundar para poder contribuir..
Após atualizar isso o erro apresentado foi "Situação Cadastral do cliente encontra-se undefined!"

from cnpj-gratis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.