4 Commits
3.0 ... 3.x

Author SHA1 Message Date
User
5eaf931847 20240410#8 2024-04-10 03:36:09 +03:00
User
efe3b0ad5a 20240410#4 2024-04-10 02:37:25 +03:00
User
d9a3deef90 20231113#2 2023-11-13 04:13:49 +03:00
User
0c121af290 20231113#1 2023-11-13 04:12:41 +03:00
3 changed files with 13 additions and 5 deletions

View File

@@ -12,7 +12,7 @@
"ext-yaml": "*",
"psr/log": "^3.0.0",
"psr/container": "^1.0",
"rmphp/foundation": "^1.0"
"rmphp/foundation": "^2.0"
},
"autoload": {
"psr-4": {

View File

@@ -82,7 +82,7 @@ class App extends Main {
$this->syslogger()->warning("Exception: ".$exception->getMessage()." : ".$exception->getFile()." : ".$exception->getLine());
}
catch (AppError $appError){
if($this->logger()) $this->logger()->warning($appError->getMessage()." on ".$appError->getFile().":".$appError->getLine());
if($this->logger()) $this->logger()->error($appError->getMessage()." on ".$appError->getFile().":".$appError->getLine());
$this->syslogger()->error("Error: ".$appError->getMessage()." : ".$appError->getFile()." : ".$appError->getLine());
}
catch (\Error $error) {

View File

@@ -4,6 +4,7 @@ namespace Rmphp\Kernel;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UploadedFileInterface;
class Globals {
@@ -150,10 +151,17 @@ class Globals {
/**
* @param string $name
* @return array|int|string
* @return array|UploadedFileInterface|null
*/
public function files(string $name = "") {
return $this->onGlobal($this->request->getUploadedFiles(), $name);
public function files(string $name = ""): array|UploadedFileInterface|null {
$name = strtolower($name);
$var = $this->request->getUploadedFiles();
if (!empty($name))
{
if (!isset($var[$name])) return null;
return $var[$name];
}
return $var;
}
/**