WordPress.org

Make WordPress Core

Ticket #38203: 38203.patch

File 38203.patch, 974 bytes (added by johnjamesjacoby, 4 years ago)

Prefer intval() over absint() in meta.php

  • src/wp-includes/meta.php

    diff --git src/wp-includes/meta.php src/wp-includes/meta.php
    index cfb9d95..ace39ff 100644
     
    3434                return false;
    3535        }
    3636
    37         $object_id = absint( $object_id );
     37        $object_id = intval( $object_id );
    3838        if ( ! $object_id ) {
    3939                return false;
    4040        }
     
    147147                return false;
    148148        }
    149149
    150         $object_id = absint( $object_id );
     150        $object_id = intval( $object_id );
    151151        if ( ! $object_id ) {
    152152                return false;
    153153        }
     
    311311                return false;
    312312        }
    313313
    314         $object_id = absint( $object_id );
     314        $object_id = intval( $object_id );
    315315        if ( ! $object_id && ! $delete_all ) {
    316316                return false;
    317317        }
     
    463463                return false;
    464464        }
    465465
    466         $object_id = absint( $object_id );
     466        $object_id = intval( $object_id );
    467467        if ( ! $object_id ) {
    468468                return false;
    469469        }
     
    530530                return false;
    531531        }
    532532
    533         $object_id = absint( $object_id );
     533        $object_id = intval( $object_id );
    534534        if ( ! $object_id ) {
    535535                return false;
    536536        }