Fixed assertion failure upon upload due to incorrect type check
This commit is contained in:
parent
d8e1346b78
commit
8fe9212882
1 changed files with 2 additions and 2 deletions
|
@ -291,7 +291,7 @@ class Upload extends Extension {
|
|||
|
||||
/**
|
||||
* Handle an upload.
|
||||
* @param string $file
|
||||
* @param string[] $file
|
||||
* @param string[] $tags
|
||||
* @param string|null $source
|
||||
* @param int $replace
|
||||
|
@ -299,7 +299,7 @@ class Upload extends Extension {
|
|||
*/
|
||||
private function try_upload($file, $tags, $source, $replace=-1) {
|
||||
global $page;
|
||||
assert('is_string($file)');
|
||||
assert('is_array($file)');
|
||||
assert('is_array($tags)');
|
||||
assert('is_string($source) || is_null($source)');
|
||||
assert('is_int($replace)');
|
||||
|
|
Reference in a new issue