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

Argument #1 is not an array #1

Open
I-am-possible opened this issue Aug 23, 2018 · 1 comment
Open

Argument #1 is not an array #1

I-am-possible opened this issue Aug 23, 2018 · 1 comment

Comments

@I-am-possible
Copy link

I-am-possible commented Aug 23, 2018

After uploading it:

Warning: array_merge(): Argument #1 is not an array in /beta/index.php on line 77
Warning: array_merge(): Argument #1 is not an array in /beta/index.php on line 78

The lines are:

foreach (glob(dirname($pattern).'/*') as $dir) {
$first_files = array_merge($first_files, $this->readDirectory($dir.'/'.basename($pattern)));

Btw.: The users need PHP 5.4 and up, otherwise it will stop because of the [] synthax (and more).
I am on 5.6 actually unless the dev says it will still work with 7.1.


EDIT: I also have this error:
Warning: Invalid argument supplied for foreach() in /beta/backend/templates/_footer.php on line 5

EDIT2: And this one:
5
Warning: Invalid argument supplied for foreach() in /beta/backend/plugins/PluginAutoLink.php on line 18

I think they have just errors because of the same.

@lukasfrydek
Copy link

Edit first line from:
foreach (glob(dirname($pattern).'/*') as $dir) {
To:
foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR) as $dir) {

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

2 participants