Commit 77e6fbf8 authored by Jonathan Hunt's avatar Jonathan Hunt

#4 Update Voting API to 7.x-2.15.

parent 76e7fb4a
......@@ -12,9 +12,8 @@ files[] = views/votingapi_views_handler_field_value.inc
files[] = views/votingapi_views_handler_sort_nullable.inc
files[] = views/votingapi_views_handler_relationship.inc
; Information added by Drupal.org packaging script on 2018-04-01
version = "7.x-2.14"
; Information added by Drupal.org packaging script on 2018-05-20
version = "7.x-2.15"
core = "7.x"
project = "votingapi"
datestamp = "1522602501"
datestamp = "1526810587"
......@@ -191,7 +191,11 @@ function votingapi_set_votes(&$votes, $criteria = NULL) {
// If the calling function didn't explicitly set criteria for vote deletion,
// build up the delete queries here.
foreach ($votes as $vote) {
$tmp = $vote + votingapi_current_user_identifier();
$identifier_info = votingapi_current_user_identifier();
// Make sure we're dealing with an array to avoid errors.
if (is_array($vote) && is_array($identifier_info)) {
$tmp = $vote + $identifier_info;
}
if (isset($tmp['value'])) {
unset($tmp['value']);
}
......@@ -657,7 +661,7 @@ function votingapi_select_single_result_value($criteria = array()) {
*/
function _votingapi_prep_vote(&$vote) {
global $user;
if (empty($vote['prepped'])) {
if (is_array($vote) && empty($vote['prepped'])) {
$vote += array(
'entity_type' => 'node',
'value_type' => 'percent',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment