mirror of
https://github.com/Karaka-Management/oms-Draw.git
synced 2026-01-25 12:28:41 +00:00
Add more explicit type casts
This commit is contained in:
parent
aa90c5cce5
commit
0e8a5cac55
|
|
@ -248,7 +248,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
// todo: implement limit since this could get exploited
|
||||
do {
|
||||
$filename = sha1($request->getData('image') . $rnd);
|
||||
$filename = sha1(((string) $request->getData('image')) . $rnd);
|
||||
$filename .= '.' . $extension;
|
||||
|
||||
$rnd = mt_rand();
|
||||
|
|
@ -256,12 +256,12 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
$fullPath = __DIR__ . '/../../' . $path . '/' . $filename;
|
||||
|
||||
$this->createLocalFile($fullPath, $request->getData('image'));
|
||||
$this->createLocalFile($fullPath, (string) $request->getData('image'));
|
||||
|
||||
$status = [
|
||||
'path' => $path,
|
||||
'filename' => $filename,
|
||||
'name' => $request->getData('title'),
|
||||
'name' => (string) $request->getData('title'),
|
||||
'size' => File::size($fullPath),
|
||||
'extension' => $extension,
|
||||
'status' => UploadStatus::OK,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user