Skip to content

Commit

Permalink
Fix PHP 8.2 deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-st committed Dec 15, 2024
1 parent cb25ff8 commit 024b3bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/lcp-catlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class CatList{
private $instance = 0;
private $utils;
private $wrapper;
private $saved_post;
private $saved_wp_query;

/**
* Constructor gets the shortcode attributes as parameter
Expand Down
1 change: 1 addition & 0 deletions include/lcp-catlistdisplayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

class CatListDisplayer {
public $catlist;
private $parent;
private $wrapper;
private $templater;
private $params = array();
Expand Down
4 changes: 2 additions & 2 deletions tests/lcpcategory/test-currentCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function test_single_post_page() {
$cat_ID_2 = self::$test_cat_2;
$this->go_to('/?p=' . self::$test_post_2);
$this->assertQueryTrue('is_singular', 'is_single');
$this->assertSame("${cat_ID_1},${cat_ID_2}", $lcpcategory->current_category('yes'));
$this->assertSame("{$cat_ID_1},{$cat_ID_2}", $lcpcategory->current_category('yes'));
}

public function test_post_with_excluded_cats() {
Expand Down Expand Up @@ -137,7 +137,7 @@ public function test_other_mode() {
$this->go_to('/?p=' . self::$test_post_2);
$this->assertQueryTrue('is_singular', 'is_single');
$this->assertSame(
"-${cat_ID_1},-${cat_ID_2}",
"-{$cat_ID_1},-{$cat_ID_2}",
$lcpcategory->current_category('other')
);
}
Expand Down

0 comments on commit 024b3bc

Please sign in to comment.