Skip to content

Commit

Permalink
My Jetpack: avoid PHP warning when is_silent is not set (#38963)
Browse files Browse the repository at this point in the history
* My Jetpack: avoid PHP warning when is_silent is not set

Follow-up to #38534

This should avoid warnings like this one:

```
PHP Warning:  Undefined array key "is_silent" in /srv/htdocs/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-my-jetpack/src/class-initializer.php on line 759
```

* Update projects/packages/my-jetpack/src/class-initializer.php

Co-authored-by: Brad Jorsch <[email protected]>

---------

Co-authored-by: Brad Jorsch <[email protected]>
  • Loading branch information
2 people authored and gogdzl committed Oct 25, 2024
1 parent 2ba358e commit fb90c0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Notification bubbles: avoid PHP warning when information is missing.
2 changes: 1 addition & 1 deletion projects/packages/my-jetpack/src/class-initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ public static function maybe_show_red_bubble() {
self::get_red_bubble_alerts(),
function ( $alert ) {
// We don't want to show silent alerts
return ! $alert['is_silent'];
return empty( $alert['is_silent'] );
}
);

Expand Down

0 comments on commit fb90c0d

Please sign in to comment.