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

Warning: count(): Parameter must be an array or an object that implements Countable #6

Open
boban-dj opened this issue Apr 22, 2018 · 5 comments

Comments

@boban-dj
Copy link

Change line 351 phpinvoice.php, its not counting the multi array for the header:billing-purchaser info
fromfor ($i = 1; $i < max(count($this->from), count($this->to)); $i++) {
to for ($i = 1; $i < max(count([$this->from],1), count([$this->to],1)); $i++) {

@alsoGAMER
Copy link

Same error at line 715, how i can fix?

@boban-dj
Copy link
Author

make it an array so its countable:
for($i=1; $i<max(count([$this->from],1),count([$this->to],1)); $i++) {

@alsoGAMER
Copy link

FATAL ERROR syntax error, unexpected ']', expecting ',' or ')' on line number 566

line 566: if(preg_match('/([^=])=["']?([^"'])/',$v,$a3))

@boban-dj
Copy link
Author

i stopped using this package

@ClaudioVeg
Copy link

Hi, change with this and it work fine...

if (is_countable($this->from) && is_countable($this->to)) { for($i=1; $i<max(count($this->from),count($this->to)); $i++) { $this->Cell($width,$lineheight,iconv("UTF-8", "ISO-8859-1//TRANSLIT//IGNORE",$this->from[$i]),0,0,'L'); $this->Cell(0,$lineheight,iconv("UTF-8", "ISO-8859-1//TRANSLIT//IGNORE",$this->to[$i]),0,0,'L'); $this->Ln(5); } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants