From 101b528650d6fe2647c1d8b0380c4cca661cde11 Mon Sep 17 00:00:00 2001 From: Richard Tape Date: Wed, 17 Nov 2021 09:20:55 -0800 Subject: [PATCH] Prevented fatal error when a PUID wasn't attached to a user as the actor 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 --- caliper/entity.php | 2 -- wp-caliper.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/caliper/entity.php b/caliper/entity.php index 383e682..117197a 100644 --- a/caliper/entity.php +++ b/caliper/entity.php @@ -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 ); } } diff --git a/wp-caliper.php b/wp-caliper.php index e790aef..1b44185 100644 --- a/wp-caliper.php +++ b/wp-caliper.php @@ -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