title: exif_imagetype error, filename cannot be empty
body: <p>Below is my code to check if the uploaded image is an image specifically a .png file. But I'm getting an error saying exif_imagetype: filename cannot be empty.</p>
  
  <pre><code>//finally move the file to permanent location
          if(exif_imagetype($_FILES[$thumbnail_fieldname]['tmp_name'] == IMAGETYPE_PNG)){ 
              if(move_uploaded_file($_FILES[$thumbnail_fieldname]['tmp_name'], $thumbnail_filename)){
                  //DATETIME
                  $date = date("Y-m-d H:i:s");
  
                  //insert into SQL code here
                  $insert_sql = "INSERT INTO walls(wall_name, thumbnail_path, upload_date) " .
                                "VALUES ('{$wall_name}', '{$thumbnail_filename}', '{$date}');";
  
                  echo "&lt;p&gt;Success: Image/s uploaded.&lt;/p&gt;";
              }else{
                  echo "&lt;p&gt;Error: Image/s not uploaded.&lt;/p&gt;";
                  }
          }else{
              echo "&lt;p&gt;Error: This is not an image.&lt;/p&gt;";
          }
  </code></pre>