mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
Update dependencies.
This commit is contained in:
parent
43c00721ca
commit
feb9ac315b
11243 changed files with 338413 additions and 11922 deletions
|
@ -76,7 +76,7 @@ class UploadedFile extends File
|
|||
* It is extracted from the request from which the file has been uploaded.
|
||||
* Then it should not be considered as a safe value.
|
||||
*
|
||||
* @return string The original name
|
||||
* @return string
|
||||
*/
|
||||
public function getClientOriginalName()
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ class UploadedFile extends File
|
|||
* It is extracted from the original file name that was uploaded.
|
||||
* Then it should not be considered as a safe value.
|
||||
*
|
||||
* @return string The extension
|
||||
* @return string
|
||||
*/
|
||||
public function getClientOriginalExtension()
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ class UploadedFile extends File
|
|||
* For a trusted mime type, use getMimeType() instead (which guesses the mime
|
||||
* type based on the file content).
|
||||
*
|
||||
* @return string The mime type
|
||||
* @return string
|
||||
*
|
||||
* @see getMimeType()
|
||||
*/
|
||||
|
@ -126,7 +126,7 @@ class UploadedFile extends File
|
|||
* For a trusted extension, use guessExtension() instead (which guesses
|
||||
* the extension based on the guessed mime type for the file).
|
||||
*
|
||||
* @return string|null The guessed extension or null if it cannot be guessed
|
||||
* @return string|null
|
||||
*
|
||||
* @see guessExtension()
|
||||
* @see getClientMimeType()
|
||||
|
@ -146,7 +146,7 @@ class UploadedFile extends File
|
|||
* If the upload was successful, the constant UPLOAD_ERR_OK is returned.
|
||||
* Otherwise one of the other UPLOAD_ERR_XXX constants is returned.
|
||||
*
|
||||
* @return int The upload error
|
||||
* @return int
|
||||
*/
|
||||
public function getError()
|
||||
{
|
||||
|
@ -154,9 +154,9 @@ class UploadedFile extends File
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns whether the file was uploaded successfully.
|
||||
* Returns whether the file has been uploaded with HTTP and no error occurred.
|
||||
*
|
||||
* @return bool True if the file has been uploaded with HTTP and no error occurred
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid()
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ class UploadedFile extends File
|
|||
/**
|
||||
* Moves the file to a new location.
|
||||
*
|
||||
* @return File A File object representing the new file
|
||||
* @return File
|
||||
*
|
||||
* @throws FileException if, for any reason, the file could not have been moved
|
||||
*/
|
||||
|
@ -182,8 +182,11 @@ class UploadedFile extends File
|
|||
$target = $this->getTargetFile($directory, $name);
|
||||
|
||||
set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
|
||||
$moved = move_uploaded_file($this->getPathname(), $target);
|
||||
restore_error_handler();
|
||||
try {
|
||||
$moved = move_uploaded_file($this->getPathname(), $target);
|
||||
} finally {
|
||||
restore_error_handler();
|
||||
}
|
||||
if (!$moved) {
|
||||
throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error)));
|
||||
}
|
||||
|
@ -264,7 +267,7 @@ class UploadedFile extends File
|
|||
/**
|
||||
* Returns an informative upload error message.
|
||||
*
|
||||
* @return string The error message regarding the specified error code
|
||||
* @return string
|
||||
*/
|
||||
public function getErrorMessage()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue