Skip to content

Commit e4a4d98

Browse files
authored
Merge pull request #628 from humanmade/backport-617-to-v22-branch
[Backport v22-branch] Fix warning when no metadata is set for title
2 parents 19a86f1 + 57dc206 commit e4a4d98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/class-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function get_subpages() : array {
118118
$order_b = $b->get_meta( 'order' ) ?? 0;
119119

120120
if ( $order_a === $order_b ) {
121-
return strnatcasecmp( $a->get_meta( 'title' ), $b->get_meta( 'title' ) );
121+
return strnatcasecmp( $a->get_meta( 'title' ) ?? '', $b->get_meta( 'title' ) ?? '' );
122122
}
123123

124124
return $order_a <=> $order_b;

0 commit comments

Comments
 (0)