Permalink
Browse files

Examples: Avoid PHP notice in upload.php.

  • Loading branch information...
1 parent 1fe3e90 commit b64e047261bac8059ea6fa9d9529bc71cadea211 @jayarjo jayarjo committed Mar 20, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/upload.php
View
@@ -34,10 +34,10 @@
@mkdir($targetDir);
}
-$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
+$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : uniqid("file_");
$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName;
-$chunking = is_numeric($_REQUEST["offset"]) && is_numeric($_REQUEST["total"]);
+$chunking = isset($_REQUEST["offset"]) && isset($_REQUEST["total"]);
// Remove old temp files

0 comments on commit b64e047

Please sign in to comment.