Fixed artisan:optimize crash
Merge pull request #3188 from anhskohbo/patch-3

Fixed artisan optimize crash