phroggyy / gedify-api

A collection of useless APIs
MIT License
1 stars 2 forks source link

Fix "Only variables should be passed by reference" error #6

Closed cwhite92 closed 8 years ago

cwhite92 commented 8 years ago

I think this is a strict mode only thing. When trying to run artisan commands I got the above error (due to the scandir output being passed into array_splice), this solves it.

phroggyy commented 8 years ago

Thanks Chris, much nicer way using the DirectoryIterator! I had just done an ugly fix, this is much better. I also took the freedom of adding a check for isFile in the skip conditional, so we don't create a new API for any files that may end up there. :smile: