Make WordPress Core

Changeset 8562 for trunk/wp-settings.php


Ignore:
Timestamp:
08/05/2008 11:56:52 PM (17 years ago)
Author:
azaozz
Message:

Stop fatal error in post revisions when setting the include path is disabled. Props santosj, for 2.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r8516 r8562  
    182182 */
    183183define('WPINC', 'wp-includes');
     184
     185if ( constant('WP_POST_REVISIONS') ) {
     186    /*
     187     * PEAR Text_Diff depends on the include path matching its directory
     188     * structure. This prevents modifying source code and maintaining the
     189     * modifications when the package is updated.
     190     */
     191    if ( function_exists( 'set_include_path' ) )
     192        set_include_path( get_include_path() . PATH_SEPARATOR . ABSPATH . WPINC );
     193    else if ( function_exists( 'ini_set' ) )
     194        ini_set( 'include_path',  ini_get('include_path') . PATH_SEPARATOR . ABSPATH . WPINC );
     195    else
     196        define('WP_INCLUDE_PATH_DISABLED', true);
     197}
    184198
    185199if ( !defined('WP_LANG_DIR') ) {
Note: See TracChangeset for help on using the changeset viewer.