mirror of
https://github.com/Karaka-Management/oms-Draw.git
synced 2026-02-13 13:48:40 +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
|
// todo: implement limit since this could get exploited
|
||||||
do {
|
do {
|
||||||
$filename = sha1($request->getData('image') . $rnd);
|
$filename = sha1(((string) $request->getData('image')) . $rnd);
|
||||||
$filename .= '.' . $extension;
|
$filename .= '.' . $extension;
|
||||||
|
|
||||||
$rnd = mt_rand();
|
$rnd = mt_rand();
|
||||||
|
|
@ -256,12 +256,12 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
|
|
||||||
$fullPath = __DIR__ . '/../../' . $path . '/' . $filename;
|
$fullPath = __DIR__ . '/../../' . $path . '/' . $filename;
|
||||||
|
|
||||||
$this->createLocalFile($fullPath, $request->getData('image'));
|
$this->createLocalFile($fullPath, (string) $request->getData('image'));
|
||||||
|
|
||||||
$status = [
|
$status = [
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
'filename' => $filename,
|
'filename' => $filename,
|
||||||
'name' => $request->getData('title'),
|
'name' => (string) $request->getData('title'),
|
||||||
'size' => File::size($fullPath),
|
'size' => File::size($fullPath),
|
||||||
'extension' => $extension,
|
'extension' => $extension,
|
||||||
'status' => UploadStatus::OK,
|
'status' => UploadStatus::OK,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user