Skip to content

Avoid warning message from array_merge in autoload for sites without classes/ or handlers/ - #29

Closed
jonhoo wants to merge 1 commit into
habari:masterfrom
jonhoo:patch-1
Closed

Avoid warning message from array_merge in autoload for sites without classes/ or handlers/#29
jonhoo wants to merge 1 commit into
habari:masterfrom
jonhoo:patch-1

Conversation

@jonhoo

@jonhoo jonhoo commented Dec 6, 2012

Copy link
Copy Markdown
Contributor

Make calls to glob() use Utils::glob both for consistency and to prevent PHP warning if site has empty /classes/ or /handlers/ folders.
Utils::glob always returns an array, and so array_merge won't yield a warning, whereas plain glob() will.

Make calls to glob() use Utils::glob both for consistency and to prevent PHP warning if site has empty /classes/ or /handlers/ folders.
Utils::glob always returns an array, and so array_merge won't yield a warning, whereas plain glob() will.
@moeffju

moeffju commented Dec 12, 2012

Copy link
Copy Markdown
Member

I think using a potentially autoloaded class inside the autoloader is troublesome.
@jonhoo, I would merge this if you changed it to instead handle glob() returning false. That should be the safe choice.

@jonhoo

jonhoo commented Dec 12, 2012

Copy link
Copy Markdown
Contributor Author

Replaced by pull request #30

@jonhoo jonhoo closed this Dec 12, 2012
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

Successfully merging this pull request may close these issues.

2 participants