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

File->getDestination fails without extension #2103

Closed
MGatner opened this issue Jul 24, 2019 · 1 comment
Closed

File->getDestination fails without extension #2103

MGatner opened this issue Jul 24, 2019 · 1 comment

Comments

@MGatner
Copy link
Member

MGatner commented Jul 24, 2019

Describe the bug
Calling $file->move() and providing a new filename without an extension causes a failed array reference because pathinfo() does not have an extension key in the resulting array.

CodeIgniter 4 version
Latest develop

Affected module(s)
File Class, HTTPFile Class

Context

  • OS: Linux
  • Web server: Apache
  • PHP version: 7.2
@MGatner
Copy link
Member Author

MGatner commented Jul 24, 2019

CRITICAL - 2019-07-24 15:38:09 --> Undefined index: extension
#0 ./vendor/codeigniter4/codeigniter4/system/Files/File.php(223): CodeIgniter\Debug\Exceptions->errorHandler(8, 'Undefined index...', '/srv/web/...', 223, Array)
#1 ./vendor/codeigniter4/codeigniter4/system/HTTP/Files/UploadedFile.php(176): CodeIgniter\Files\File->getDestination('/srv/web/...')
#2 ./app/Controllers/Files.php(46): CodeIgniter\HTTP\Files\UploadedFile->move('/srv/web/...', 'noext')
#3 ./vendor/codeigniter4/codeigniter4/system/CodeIgniter.php(838): App\Controllers\Files->upload()
#4 ./vendor/codeigniter4/codeigniter4/system/CodeIgniter.php(335): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\Files))
#5 ./vendor/codeigniter4/codeigniter4/system/CodeIgniter.php(245): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#6 ./public/index.php(45): CodeIgniter\CodeIgniter->run()

@MGatner MGatner mentioned this issue Jul 24, 2019
5 tasks
@MGatner MGatner closed this as completed Jul 24, 2019
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

1 participant