diff options
author | Faraz Samapoor <fsa@adlas.at> | 2023-07-03 13:04:37 +0330 |
---|---|---|
committer | Faraz Samapoor <f.samapoor@gmail.com> | 2023-07-03 13:13:11 +0330 |
commit | 9d15e6e21da653beab4837bfd439ff2a13bf749c (patch) | |
tree | 9a594be9d78f1d6c6bd392c3f50bb8e164c8cbb1 /apps/workflowengine/lib | |
parent | 5db241b942d2c9b1809eb8b7ced100b3dac3d7bc (diff) | |
download | nextcloud-server-9d15e6e21da653beab4837bfd439ff2a13bf749c.tar.gz nextcloud-server-9d15e6e21da653beab4837bfd439ff2a13bf749c.zip |
Fixes "PossiblyFalseArgument" notices.
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'apps/workflowengine/lib')
-rw-r--r-- | apps/workflowengine/lib/Check/FileMimeType.php | 8 | ||||
-rw-r--r-- | apps/workflowengine/lib/Check/RequestURL.php | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/workflowengine/lib/Check/FileMimeType.php b/apps/workflowengine/lib/Check/FileMimeType.php index b4094b3675c..9e0eb51f6f0 100644 --- a/apps/workflowengine/lib/Check/FileMimeType.php +++ b/apps/workflowengine/lib/Check/FileMimeType.php @@ -157,11 +157,11 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck { protected function isWebDAVRequest() { return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && ( $this->request->getPathInfo() === '/webdav' || - str_starts_with($this->request->getPathInfo(), '/webdav/') || + str_starts_with($this->request->getPathInfo() ?? '', '/webdav/') || $this->request->getPathInfo() === '/dav/files' || - str_starts_with($this->request->getPathInfo(), '/dav/files/') || + str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/') || $this->request->getPathInfo() === '/dav/uploads' || - str_starts_with($this->request->getPathInfo(), '/dav/uploads/') + str_starts_with($this->request->getPathInfo() ?? '', '/dav/uploads/') ); } @@ -171,7 +171,7 @@ class FileMimeType extends AbstractStringCheck implements IFileCheck { protected function isPublicWebDAVRequest() { return substr($this->request->getScriptName(), 0 - strlen('/public.php')) === '/public.php' && ( $this->request->getPathInfo() === '/webdav' || - str_starts_with($this->request->getPathInfo(), '/webdav/') + str_starts_with($this->request->getPathInfo() ?? '', '/webdav/') ); } diff --git a/apps/workflowengine/lib/Check/RequestURL.php b/apps/workflowengine/lib/Check/RequestURL.php index 806fe1bcefc..deff68826f2 100644 --- a/apps/workflowengine/lib/Check/RequestURL.php +++ b/apps/workflowengine/lib/Check/RequestURL.php @@ -90,9 +90,9 @@ class RequestURL extends AbstractStringCheck { } return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && ( $this->request->getPathInfo() === '/webdav' || - str_starts_with($this->request->getPathInfo(), '/webdav/') || + str_starts_with($this->request->getPathInfo() ?? '', '/webdav/') || $this->request->getPathInfo() === '/dav/files' || - str_starts_with($this->request->getPathInfo(), '/dav/files/') + str_starts_with($this->request->getPathInfo() ?? '', '/dav/files/') ); } } |