Use type-specific comparisons over empty
This commit is contained in:
parent
37383c3b1e
commit
237db1c58a
|
@ -79,7 +79,7 @@ class MDErrorReporter {
|
|||
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 @@ class MDErrorReporter {
|
|||
=========================
|
||||
";
|
||||
|
||||
if (!empty($contextInfo)) {
|
||||
if ($contextInfo !== []) {
|
||||
$msg .= $this->_formulateDebugMailSection("Context information", $contextInfo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user