Use type-specific comparisons over empty
This commit is contained in:
1 parent
37383c3b1e
commit
237db1c58a
1 file changed
+2
-2
+2
-2
@@ -79,7 +79,7 @@ final public function human_filesize(string $bytes, int $decimals = 2):string {
|
||||
final private function _formulateDebugMailSection(string $headline, array $toFormat, int $level = 0):string {
|
||||
|
||||
$msg = "";
|
||||
if (!empty($headline)) {
|
||||
if ($headline !== "") {
|
||||
if ($level === 0) {
|
||||
$msg .= PHP_EOL . "## " . $headline;
|
||||
$msg .= PHP_EOL . "----------------------" . PHP_EOL . PHP_EOL;
|
||||
@@ -147,7 +147,7 @@ final public function sendDebugMail(string $to, string $subject = "", string $de
|
||||
=========================
|
||||
";
|
||||
|
||||
if (!empty($contextInfo)) {
|
||||
if ($contextInfo !== []) {
|
||||
$msg .= $this->_formulateDebugMailSection("Context information", $contextInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user