ministryofjustice / intranet

Intranet used by the Ministry of Justice and agencies
MIT License
7 stars 1 forks source link

Bug/CDPT-2258 Handle empty post and text domain. Add constructor to notify-for-wordpress #770

Closed EarthlingDavey closed 2 days ago

EarthlingDavey commented 3 days ago

There is a bug where the notify dashboard was firing a fatal php error.

This was because the plugin was not setting the text-domain correctly. This has been fixed in the upstream git repo and a patch fix in this PR.

In a defensive programming move, coauthors_filter_text has been changed so that text domain is an optional string.

$post?->post_type should also fix the warning Attempt to read property "post_type" on null

EarthlingDavey commented 2 days ago

Good shout, I've made a note in the upstream PR that this find and replace must be removed if the upstream PR is merged and released.