Skip to content

Commit

Permalink
minor fix to setup course data function
Browse files Browse the repository at this point in the history
  • Loading branch information
therealmarknelson committed Jun 5, 2015
1 parent 4c5c600 commit 16ee9c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/llms.template.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ function lifterlms_template_quiz_results() {
function llms_setup_course_data( $post ) {
if ( ! is_admin() ) {

if ($post->post_type == 'course') {
if ($post && $post->post_type == 'course') {
unset( $GLOBALS['course'] );

if ( is_int( $post ) )
Expand Down
2 changes: 1 addition & 1 deletion templates/course/outline-list-small.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<?php if ( LLMS_Course::check_enrollment( $course->id, get_current_user_id() ) ) : ?>

<a href="' . get_permalink( $lesson['id'] ) . '"><?php echo $lesson['title']; ?></a>
<a href="<?php echo get_permalink( $lesson['id'] ); ?>"><?php echo $lesson['title']; ?></a>

<?php else :

Expand Down

0 comments on commit 16ee9c0

Please sign in to comment.