Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught TypeError: Argument 1 passed to Itrack\Anaf\Parser::__construct() must be of the type array, null given #20

Open
stardand opened this issue Jan 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@stardand
Copy link

PHP 7.3.33
API ANAF V8
itrack/anaf: 3.0.6

Notice: Undefined offset: 0 in /var/www/.miio-v4/libs/vendor/itrack/anaf/src/Client.php on line 75

Fatal error: Uncaught TypeError: Argument 1 passed to Itrack\Anaf\Parser::__construct() must be of the type array, null given, called in.../itrack/anaf/src/Client.php on line 75 and defined in .../itrack/anaf/src/Parser.php on line 13

TypeError: Argument 1 passed to Itrack\Anaf\Parser::__construct() must be of the type array, null given, called in .../itrack/anaf/src/Client.php on line 75 in .../itrack/anaf/src/Parser.php on line 13

@itrack itrack added the bug Something isn't working label Jan 23, 2024
@itrack
Copy link
Owner

itrack commented Jan 23, 2024

Salut,
Imi poti spune te rog pentru ce CIF promesti aceasta eroare?

Multumesc!

@stardand
Copy link
Author

stardand commented Jan 23, 2024

Am testat 213 sau 1243 si am primit eroarea de mai sus.. apoi am primit status 302 si mai tarziu 500.
Am incercat sa pun un array gol in cazul in care $results[0] este NULL, dar apareau erori in alta parte... /itrack/anaf/src/Client.php on line 75 // return new Company(new Parser($results[0] ?? []));

Se pare ca serverele anaf functioneaza, acum.

Edit:
Eroarea apare daca nu gaseste (sau nu exista) CIF-ul.

@itrack
Copy link
Owner

itrack commented Jan 23, 2024

Multumesc pentru explicatii, voi o validare pentru CIF-uri, nu am testat din pacate cazul asta dar am pus-o pe lista.

Multumesc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants