Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVitor Mattos <vitor@php.rio>2021-12-06 20:17:04 +0300
committerVitor Mattos <vitor@php.rio>2021-12-06 20:17:09 +0300
commit7b36db07a31bbf6821551f95dff317923c9e0770 (patch)
treec2bed9908140beedaa0d07c3914e09fa87030477 /lib
parent7d9aa7712e0323d388215fd76bbede18ff9f6881 (diff)
Reduce PossiblyFalseArgument
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r--lib/Chat/Command/Executor.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Chat/Command/Executor.php b/lib/Chat/Command/Executor.php
index 0862936c4..121f53fe2 100644
--- a/lib/Chat/Command/Executor.php
+++ b/lib/Chat/Command/Executor.php
@@ -140,8 +140,9 @@ class Executor {
}
$response = trim($response);
- if (strpos($response, "\n")) {
- $tempHelp = substr($response, 0, strpos($response, "\n"));
+ $newLinePosition = strpos($response, "\n");
+ if ($newLinePosition !== false) {
+ $tempHelp = substr($response, 0, $newLinePosition);
if ($tempHelp === 'Description:') {
$hasHelpSection = strpos($response, "\nHelp:\n");
if ($hasHelpSection !== false) {