Skip to content

[Insight] Boolean should be compared strictly - in source/Threema/…/Tools/CryptTool.php, line 163 #14

@rugk

Description

@rugk

in source/Threema/MsgApi/Tools/CryptTool.php, line 163

With booleans, only strict comparison (with !== operator) should be used to lower bug risks and to improve performances.

            'n' => $fileAnalysisResult->getFileName(),
            's' => $fileAnalysisResult->getSize(),
            'i' => 0
        );

        if($thumbnailUploadFileResult != null && strlen($thumbnailUploadFileResult->getBlobId()) > 0) {
            $messageContent['t'] = $thumbnailUploadFileResult->getBlobId();
        }

        $message = "\x17" . json_encode($messageContent);

Posted from SensioLabsInsight

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions