Make WordPress Core

Changeset 10826


Ignore:
Timestamp:
03/20/2009 01:02:05 AM (17 years ago)
Author:
azaozz
Message:

Fix notice in plugins editor, props sivel, fixes #9367

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/misc.php

    r10810 r10826  
    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            }
Note: See TracChangeset for help on using the changeset viewer.