Plugin Directory

Changeset 193136


Ignore:
Timestamp:
01/12/2010 12:20:30 PM (16 years ago)
Author:
frekel
Message:

Array_reduce fix

Location:
wp-photocontest/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-photocontest/trunk/readme.txt

    r192826 r193136  
    55Requires at least: 2.7
    66Tested up to: 2.9.1
    7 Stable tag: 1.4.2
     7Stable tag: 1.4.2.1
    88
    99This plugin automatically turns a WordPress-page into a photo contest.
     
    176176
    177177== Changelog ==
     178= 1.4.2.1 - 11.01.2010  =
     179* Fix for "There is no object with id upload_email" error.
     180* Fix a array_reduce error
     181
    178182= 1.4.2 - 11.01.2010  =
    179183* Fix for wordpress 2.7.1 and "There is no object with id upload_email" error
  • wp-photocontest/trunk/viewimg.php

    r192821 r193136  
    9696if (ROLE_VOTING != '')
    9797{
    98     $upload_role_details = get_role(ROLE_UPLOAD);
    99     $user_level = array_reduce( array_keys($upload_role_details->capabilities), 'wppc_level_reduction');
    100    
     98    $upload_role_details = get_role(ROLE_VOTING);
     99    $user_level = 0;
     100    if (is_array($upload_role_details->capabilities))
     101    {
     102        $user_level = array_reduce(array_keys($upload_role_details->capabilities), 'wppc_level_reduction');
     103    }
     104
    101105    if (is_user_logged_in())
    102106    {
Note: See TracChangeset for help on using the changeset viewer.