Skip to content

Commit dd4c0f2

Browse files
Merge pull request #265 from level-level/fix/php_8_2_compat_jsonserialize
Fix jsonserialize function return type deprication notice in php 8.1+
2 parents 4e3df05 + c4c04ea commit dd4c0f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/WordPress_Object/Clarkson_Object.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ public function get_comments( array $args = array() ): array {
626626
*
627627
* We can't just return $this->_post, because these values will only return raw unfiltered data.
628628
*/
629+
#[\ReturnTypeWillChange]
629630
public function jsonSerialize(): mixed {
630631
$data = array();
631632
$data['id'] = $this->get_id();

0 commit comments

Comments
 (0)