Skip to:
Content

BuddyPress.org

Changeset 3669


Ignore:
Timestamp:
01/07/2011 10:14:31 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Fix logic in bp_core_check_avatar_type [branch]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core/bp-core-avatars.php

    r3141 r3669  
    523523
    524524function bp_core_check_avatar_type($file) {
    525     if ( ( strlen($file['file']['type']) && !preg_match('/(jpe?g|gif|png)$/', $file['file']['type'] ) ) && !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) )
     525    if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) )
    526526        return false;
    527527
Note: See TracChangeset for help on using the changeset viewer.