Make WordPress Core


Ignore:
Timestamp:
10/18/2020 05:31:37 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Use instanceof instead of a comparison with get_class().

Includes adjusting external libraries which are no longer maintained externally.

Props jrf.
See #50767.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/Text/Diff.php

    r49185 r49194  
    277277        $prevtype = null;
    278278        foreach ($this->_edits as $edit) {
    279             if ($prevtype == get_class($edit)) {
     279            if ($edit instanceof $prevtype) {
    280280                trigger_error("Edit sequence is non-optimal", E_USER_ERROR);
    281281            }
Note: See TracChangeset for help on using the changeset viewer.