diff --git a/app/Http/Controllers/StoryComposeController.php b/app/Http/Controllers/StoryComposeController.php index dd82c5009..c2e04d4ce 100644 --- a/app/Http/Controllers/StoryComposeController.php +++ b/app/Http/Controllers/StoryComposeController.php @@ -124,7 +124,7 @@ class StoryComposeController extends Controller ], 422); } } finally { - if (! $localFs && isset($tempPath) && file_exists($tempPath)) { + if (! $localFs && file_exists($tempPath)) { unlink($tempPath); } } diff --git a/app/Util/Lexer/Validator.php b/app/Util/Lexer/Validator.php index a4a07efd7..c53642224 100755 --- a/app/Util/Lexer/Validator.php +++ b/app/Util/Lexer/Validator.php @@ -248,7 +248,7 @@ class Validator extends Regex preg_match(self::$patterns['valid_mentions_or_lists'], $list, $matches); $matches = array_pad($matches, 5, ''); - return isset($matches) && $matches[1] === '' && $matches[4] && !empty($matches[4]) && $matches[5] === ''; + return $matches[1] === '' && $matches[4] && !empty($matches[4]) && $matches[5] === ''; } /**