Skip to content

Commit 78f942b

Browse files
author
Hai Zheng
committed
v7.1-b2: Fixed a warning in CLI when enabling QC.
1 parent 7dd5234 commit 78f942b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/admin-display.cls.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,14 @@ public static function dismiss_pin_by_content($content, $color, $irremovable)
605605
$content = self::build_notice($color, $content, $irremovable);
606606
$messages = self::get_option(self::DB_MSG_PIN, array());
607607
$hit = false;
608-
foreach ($messages as $k => $v) {
609-
if ($v == $content) {
610-
unset($messages[$k]);
611-
$hit = true;
612-
self::debug('✅ pinned msg content hit. Removed');
613-
break;
608+
if ($messages != -1) {
609+
foreach ($messages as $k => $v) {
610+
if ($v == $content) {
611+
unset($messages[$k]);
612+
$hit = true;
613+
self::debug('✅ pinned msg content hit. Removed');
614+
break;
615+
}
614616
}
615617
}
616618
if ($hit) {

0 commit comments

Comments
 (0)