dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap"
[lhc/web/wiklou.git]
/
includes
/
upload
/
UploadBase.php
diff --git
a/includes/upload/UploadBase.php
b/includes/upload/UploadBase.php
index
87b96ac
..
ea805fb
100644
(file)
--- a/
includes/upload/UploadBase.php
+++ b/
includes/upload/UploadBase.php
@@
-98,11
+98,7
@@
abstract class UploadBase {
self::WINDOWS_NONASCII_FILENAME => 'windows-nonascii-filename',
self::FILENAME_TOO_LONG => 'filename-toolong',
];
self::WINDOWS_NONASCII_FILENAME => 'windows-nonascii-filename',
self::FILENAME_TOO_LONG => 'filename-toolong',
];
- if ( isset( $code_to_status[$error] ) ) {
- return $code_to_status[$error];
- }
-
- return 'unknown-error';
+ return $code_to_status[$error] ?? 'unknown-error';
}
/**
}
/**
@@
-247,7
+243,7
@@
abstract class UploadBase {
/**
* @param string $tempPath File system path to temporary file containing the upload
/**
* @param string $tempPath File system path to temporary file containing the upload
- * @param int $fileSize
+ * @param int
|null
$fileSize
*/
protected function setTempFile( $tempPath, $fileSize = null ) {
$this->mTempPath = $tempPath;
*/
protected function setTempFile( $tempPath, $fileSize = null ) {
$this->mTempPath = $tempPath;
@@
-1103,7
+1099,7
@@
abstract class UploadBase {
* file again.
*
* @deprecated since 1.28 Use tryStashFile() instead
* file again.
*
* @deprecated since 1.28 Use tryStashFile() instead
- * @param User $user
+ * @param User
|null
$user
* @return UploadStashFile Stashed file
* @throws UploadStashBadPathException
* @throws UploadStashFileException
* @return UploadStashFile Stashed file
* @throws UploadStashBadPathException
* @throws UploadStashFileException
@@
-1116,7
+1112,7
@@
abstract class UploadBase {
/**
* Implementation for stashFile() and tryStashFile().
*
/**
* Implementation for stashFile() and tryStashFile().
*
- * @param User $user
+ * @param User
|null
$user
* @return UploadStashFile Stashed file
*/
protected function doStashFile( User $user = null ) {
* @return UploadStashFile Stashed file
*/
protected function doStashFile( User $user = null ) {
@@
-1529,7
+1525,7
@@
abstract class UploadBase {
* @todo Replace this with a whitelist filter!
* @param string $element
* @param array $attribs
* @todo Replace this with a whitelist filter!
* @param string $element
* @param array $attribs
- * @param array $data
+ * @param array
|null
$data
* @return bool
*/
public function checkSvgScriptCallback( $element, $attribs, $data = null ) {
* @return bool
*/
public function checkSvgScriptCallback( $element, $attribs, $data = null ) {