Skip to content

Commit

Permalink
Prevented fatal error when a PUID wasn't attached to a user as the ac…
Browse files Browse the repository at this point in the history
…tor is now only added to the post entity when the actor is of the expected type.

Removed logging as we only add the actor when necessary.
Tagged 1.2.0
  • Loading branch information
richardtape committed Nov 17, 2021
1 parent ae6c326 commit 101b528
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions caliper/entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ public static function post( \WP_Post &$post ) {

if ( is_a( $actor, 'IMSGlobal\Caliper\entities\agent\Person' ) ) {
$post_entity->setCreators( array( $actor ) );
} else {
file_put_contents( WP_CONTENT_DIR . '/debug.log', print_r( array( 'WPCALIPERDEBUG', $actor, $author, $post_entity ), true ), FILE_APPEND );
}
}

Expand Down
2 changes: 1 addition & 1 deletion wp-caliper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: WP Caliper
* Plugin URI: https://github.com/ubc/wp-caliper
* Version: 1.1.2
* Version: 1.2.0
* Description: This plugin generates and emits Caliper events to the specified LRS
* Tags: Caliper
* Author: CTLT, Andrew Gardener
Expand Down

0 comments on commit 101b528

Please sign in to comment.