Skip to content

Commit f11d8a5

Browse files
authored
Merge pull request #116 from sectsect/master
fix: fix PHP notices
2 parents 73fd75a + 62e315d commit f11d8a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CPTP/Module/Permalink.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ public function term_link( $termlink, $term, $taxonomy ) {
403403
return $termlink;
404404
}
405405

406+
if ( ! isset( $post_type_obj->rewrite['slug'] ) || ! isset( $post_type_obj->rewrite['with_front'] ) ) {
407+
return $termlink;
408+
}
409+
406410
$slug = $post_type_obj->rewrite['slug'];
407411
$with_front = $post_type_obj->rewrite['with_front'];
408412

0 commit comments

Comments
 (0)