Why does this PHP empty filename pass validation?

Why does this PHP empty filename pass validation in upload. The PHP code checks only $_FILES error but not name. In PHP a no-file upload has empty name and can overwrite with path traversal.

#whatswrongwiththisphpcode #phpbug #phpproductionbug #phpdebugging #phpbackend #phpcodereview #phpsecurity #phpperformance #phpreliability #phpapi #phpwebdevelopment #phpengineering #phpupload #phpfilename #ph...

https://www.youtube.com/watch?v=J192uHG-sEc

Why does this PHP empty filename pass validation? #phpcodereview

YouTube