Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Commit

Permalink
Fix comparing of non-existing attribute before, closing issue #15
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Olde Hampsink committed Oct 31, 2016
1 parent de3ce3e commit f424dc0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AuditLogPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getName()
*/
public function getVersion()
{
return '0.7.0';
return '0.7.1';
}

/**
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ phpunit --bootstrap craft/app/tests/bootstrap.php --configuration craft/plugins/

Changelog
=================
###0.7.1###
- Fix comparing of non-existing attribute before, closing issue #15

###0.7.0###
- Added Craft 2.5 compatibility
- Refactored plugin for better readability, quality and testability
Expand Down
2 changes: 1 addition & 1 deletion services/AuditLogService.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function elementHasChanged($elementType, $id, $before, $after)
// Add labels once again
$diff = array();
foreach ($expanded as $key => $value) {
$diff[$key]['label'] = $before[$key]['label'];
$diff[$key]['label'] = isset($before[$key]) ? $before[$key]['label'] : '';
$diff[$key]['value'] = $value['value'];
}

Expand Down

0 comments on commit f424dc0

Please sign in to comment.