WordPress.org

Make WordPress Core

Changeset 6682


Ignore:
Timestamp:
01/29/2008 06:48:38 PM (10 years ago)
Author:
westi
Message:

Switch from abs(intval()) to absint(). See #4762.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import/btt.php

    r6430 r6682  
    3030            $step = 0;
    3131        else
    32             $step = abs(intval($_GET['step']));
     32            $step = absint($_GET['step']);
    3333
    3434        // load the header
  • trunk/wp-admin/import/jkw.php

    r6430 r6682  
    3434            $step = 0;
    3535        else
    36             $step = abs(intval($_GET['step']));
     36            $step = absint($_GET['step']);
    3737
    3838        // load the header
  • trunk/wp-includes/general-template.php

    r6632 r6682  
    370370
    371371    if ( '' != $limit ) {
    372         $limit = abs(intval($limit));
     372        $limit = absint($limit);
    373373        $limit = ' LIMIT '.$limit;
    374374    }
  • trunk/wp-includes/pluggable.php

    r6649 r6682  
    121121    global $wpdb;
    122122
    123     $user_id = abs(intval($user_id));
     123    $user_id = absint($user_id);
    124124    if ( $user_id == 0 )
    125125        return false;
  • trunk/wp-includes/query.php

    r6653 r6682  
    11971197        // Paging
    11981198        if ( empty($q['nopaging']) && !$this->is_singular ) {
    1199             $page = abs(intval($q['paged']));
     1199            $page = absint($q['paged']);
    12001200            if (empty($page)) {
    12011201                $page = 1;
     
    12071207                $limits = 'LIMIT '.$pgstrt.$q['posts_per_page'];
    12081208            } else { // we're ignoring $page and using 'offset'
    1209                 $q['offset'] = abs(intval($q['offset']));
     1209                $q['offset'] = absint($q['offset']);
    12101210                $pgstrt = $q['offset'] . ', ';
    12111211                $limits = 'LIMIT ' . $pgstrt . $q['posts_per_page'];
  • trunk/wp-settings.php

    r6681 r6682  
    1313    define('WP_MEMORY_LIMIT', '32M');
    1414
    15 if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) )
     15if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < absint(WP_MEMORY_LIMIT) ) )
    1616    @ini_set('memory_limit', WP_MEMORY_LIMIT);
    1717
Note: See TracChangeset for help on using the changeset viewer.