Make WordPress Core

Ticket #9367: 9367.1.diff

File 9367.1.diff, 877 bytes (added by sivel, 16 years ago)
  • wp-admin/includes/misc.php

     
    249249                if ( !is_array( $tokens[$t] ) ) continue;
    250250                if ( T_STRING == $tokens[$t][0] && ( '(' == $tokens[ $t + 1 ] || '(' == $tokens[ $t + 2 ] ) ) {
    251251                        // If it's a function or class defined locally, there's not going to be any docs available
    252                         if ( 'class' == $tokens[ $t - 2 ][1] || 'function' == $tokens[ $t - 2 ][1] || T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] ) {
     252                        if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] ) ) {
    253253                                $ignore_functions[] = $tokens[$t][1];
    254254                        }
    255255                        // Add this to our stack of unique references