Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/25/2011 09:53:37 PM (15 years ago)
Author:
djpaul
Message:

Use is_file instead of file_exists when in component loader to avoid matching against xprofile admin directory.

File:
1 edited

Legend:

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

    r3918 r3922  
    149149
    150150            // Check path + file
    151             if ( file_exists( $this->path . '/' . $file ) )
     151            if ( @is_file( $this->path . '/' . $file ) )
    152152                require_once( $this->path . '/' . $file );
    153153
    154154            // Check path + /bp-component/ + file
    155             elseif ( file_exists( $this->path . '/bp-' . $this->id . '/' . $file ) )
    156                 require_once( $this->$path . '/bp-' . $this->id . '/' . $file );
     155            elseif ( @is_file( $this->path . '/bp-' . $this->id . '/' . $file ) )
     156                require_once( $this->path . '/bp-' . $this->id . '/' . $file );
    157157
    158158            // Check buddypress/bp-component/bp-component-$file.php
    159             elseif ( file_exists( $this->path . '/bp-' . $this->id . '/bp-' . $this->id . '-' . $file  . '.php' ) )
     159            elseif ( @is_file( $this->path . '/bp-' . $this->id . '/bp-' . $this->id . '-' . $file  . '.php' ) )
    160160                require_once( $this->path . '/bp-' . $this->id . '/bp-' . $this->id . '-' . $file . '.php' );
    161161
Note: See TracChangeset for help on using the changeset viewer.