Skip to:
Content

BuddyPress.org

Changeset 3668


Ignore:
Timestamp:
01/07/2011 10:10:26 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Fix logic in bp_core_check_avatar_type [trunk]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-avatars.php

    r3635 r3668  
    553553
    554554function bp_core_check_avatar_type($file) {
    555     if ( ( strlen($file['file']['type']) && !preg_match('/(jpe?g|gif|png)$/', $file['file']['type'] ) ) && !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) )
     555    if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) )
    556556        return false;
    557557
Note: See TracChangeset for help on using the changeset viewer.