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

[BUG] Invalid argument supplied for foreach() #49

Closed
gmarineau opened this issue Apr 18, 2019 · 7 comments
Closed

[BUG] Invalid argument supplied for foreach() #49

gmarineau opened this issue Apr 18, 2019 · 7 comments

Comments

@gmarineau
Copy link

Versions

  • PHP version:
  • Laravel version: v5.7.28
  • Nova version: v1.3.2
  • Package version: 3.1.11 - 1.1.3

Description

Hi,

I have a simple resource with three fields and when I try to Download the excel. I get this message

Invalid argument supplied for foreach()

When I the code this variable is always null in the ExportToExcel class :

$this->actionFields;

Steps to Reproduce

Install the package, add the action in the resource and test to Download Excel.

I have try on different resources and same bug each time.

Additional Information

If in the package when I try to change the ExportExcel class and replace the

return $this->actionFields;

by this it's work

return [];

@gmarineau gmarineau changed the title Invalid argument supplied for foreach() [BUG] Invalid argument supplied for foreach() Apr 18, 2019
@mrigo
Copy link

mrigo commented Apr 30, 2019

Same here.
Any solutions?

Thanks

@nysso
Copy link

nysso commented May 5, 2019

any solution for this guys ?

@mrigo
Copy link

mrigo commented May 6, 2019

I saw that my problem was related to another Laravel nova packages, [https://novapackages.com/packages/epartment/nova-dependency-container](Nova Field Dependency Container), great package but I removed it because of this bug :(
Without it, this works fine!

@gmarineau
Copy link
Author

Okay thank's, I have created a custom Action with the same function than the package to export with Excel

@patrickbrouwers
Copy link
Member

I couldn't reproduce the issue, will try with adding that package and see if there's anything we can do from this package to make them compatible.

@nysso
Copy link

nysso commented May 6, 2019

I confirm what @mrigo said, it was this package:
https://novapackages.com/packages/epartment/nova-dependency-container
I uninstalled it and everything worked great

@patrickbrouwers
Copy link
Member

Workaround released as 1.1.4

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

4 participants