Make WordPress Core

Changeset 15246


Ignore:
Timestamp:
06/14/2010 01:34:18 AM (14 years ago)
Author:
dd32
Message:

Fix PHP Notice in Revisions comparison. Props filosofo. Fixes #13853

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-diff.php

    r8866 r15246  
    248248
    249249            // If we have a word based diff, use it.  Otherwise, use the normal line.
    250             $orig_line  = isset($orig_diffs[$orig_rows[$row]])
    251                 ? $orig_diffs[$orig_rows[$row]]
    252                 : htmlspecialchars($orig[$orig_rows[$row]]);
    253             $final_line = isset($final_diffs[$final_rows[$row]])
    254                 ? $final_diffs[$final_rows[$row]]
    255                 : htmlspecialchars($final[$final_rows[$row]]);
     250            if ( isset( $orig_diffs[$orig_rows[$row]] ) )
     251                $orig_line = $orig_diffs[$orig_rows[$row]];
     252            elseif ( isset( $orig[$orig_rows[$row]] ) )
     253                $orig_line = htmlspecialchars($orig[$orig_rows[$row]]);
     254            else
     255                $orig_line = '';
     256
     257            if ( isset( $final_diffs[$final_rows[$row]] ) )
     258                $final_line = $final_diffs[$final_rows[$row]];
     259            elseif ( isset( $final[$final_rows[$row]] ) )
     260                $final_line = htmlspecialchars($final[$final_rows[$row]]);
     261            else
     262                $final_line = '';
    256263
    257264            if ( $orig_rows[$row] < 0 ) { // Orig is blank.  This is really an added row.
Note: See TracChangeset for help on using the changeset viewer.