mirror of
https://github.com/discourse/wp-discourse.git
synced 2025-10-04 09:01:05 +08:00
Add missing initialisation of optional parameter (#461)
Before $comment_type was a required parameter following an optional parameter and this results in: ```Deprecated: Required parameter $comment_type follows optional parameter $perform_sync in [redacted]/wp-content/plugins/wp-discourse/lib/utilities.php on line 338``` This then completely breaks login on our Wordpress instance. Adding ```= null``` seems to fix the problem. Co-authored-by: Angus McLeod <angus@mcleod.org.au>
This commit is contained in:
parent
42b81e903f
commit
2c498b73ec
1 changed files with 1 additions and 1 deletions
|
@ -335,7 +335,7 @@ class Utilities {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_discourse_comments( $post_id, $perform_sync = true, $force_sync = false, $comment_type ) {
|
||||
public static function get_discourse_comments( $post_id, $perform_sync = true, $force_sync = false, $comment_type = null ) {
|
||||
$comment_formatter = new \WPDiscourse\DiscourseCommentFormatter\DiscourseCommentFormatter();
|
||||
$comment_formatter->setup_options();
|
||||
$comment_formatter->setup_logger();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue