Ticket #16302: 16302.null.diff

File 16302.null.diff, 10.8 KB (added by mfields, 2 years ago)

Lowercase appropriate null values.

  • wp-app.php

     
    614614                        $slug = substr( md5( uniqid( microtime() ) ), 0, 7); 
    615615                $ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); 
    616616                $slug = sanitize_file_name( "$slug.$ext" ); 
    617                 $file = wp_upload_bits( $slug, NULL, $bits); 
     617                $file = wp_upload_bits( $slug, null, $bits); 
    618618 
    619619                log_app('wp_upload_bits returns:',print_r($file,true)); 
    620620 
     
    10721072 
    10731073                log_app('function',"total_count(# $wp_query->max_num_pages #)"); 
    10741074                $last_page = $wp_query->max_num_pages; 
    1075                 $next_page = (($page + 1) > $last_page) ? NULL : $page + 1; 
    1076                 $prev_page = ($page - 1) < 1 ? NULL : $page - 1; 
    1077                 $last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? NULL : (int) $last_page; 
    1078                 $self_page = $page > 1 ? $page : NULL; 
     1075                $next_page = (($page + 1) > $last_page) ? null : $page + 1; 
     1076                $prev_page = ($page - 1) < 1 ? null : $page - 1; 
     1077                $last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? null : (int) $last_page; 
     1078                $self_page = $page > 1 ? $page : null; 
    10791079?><feed xmlns="<?php echo $this->ATOM_NS ?>" xmlns:app="<?php echo $this->ATOMPUB_NS ?>" xml:lang="<?php echo get_option('rss_language'); ?>" <?php do_action('app_ns'); ?> > 
    10801080<id><?php $this->the_entries_url() ?></id> 
    10811081<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated> 
     
    15261526                                global $post; 
    15271527                                $post = wp_get_single_post($this->params[1]); 
    15281528                                $wp_last_modified = get_post_modified_time('D, d M Y H:i:s', true); 
    1529                                 $post = NULL; 
     1529                                $post = null; 
    15301530                                break; 
    15311531                        case $this->ENTRIES_PATH: 
    15321532                                $wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT'; 
  • wp-includes/functions.wp-scripts.php

     
    4141 * @param string $handle Script name 
    4242 * @param string $src Script url 
    4343 * @param array $deps (optional) Array of script names on which this script depends 
    44  * @param string|bool $ver (optional) Script version (used for cache busting), set to NULL to disable 
     44 * @param string|bool $ver (optional) Script version (used for cache busting), set to null to disable 
    4545 * @param bool $in_footer (optional) Whether to enqueue the script before </head> or before </body> 
    4646 * @return null 
    4747 */ 
  • wp-includes/pomo/mo.php

     
    5353                        $originals_table .= $this->export_original($entry) . chr(0); 
    5454                        $length = strlen($this->export_original($entry)); 
    5555                        fwrite($fh, pack('VV', $length, $current_addr)); 
    56                         $current_addr += $length + 1; // account for the NULL byte after 
     56                        $current_addr += $length + 1; // account for the null byte after 
    5757                } 
    5858 
    5959                $exported_headers = $this->export_headers(); 
  • wp-includes/comment.php

     
    11161116 
    11171117        $approved = $comment->comment_approved; 
    11181118 
    1119         if ( $approved == NULL ) 
     1119        if ( $approved == null ) 
    11201120                return false; 
    11211121        elseif ( $approved == '1' ) 
    11221122                return 'approved'; 
  • wp-includes/functions.php

     
    13951395                        $k = $prefix.$k; 
    13961396                if ( !empty($key) ) 
    13971397                        $k = $key . '%5B' . $k . '%5D'; 
    1398                 if ( $v === NULL ) 
     1398                if ( $v === null ) 
    13991399                        continue; 
    14001400                elseif ( $v === FALSE ) 
    14011401                        $v = '0'; 
     
    14081408                        array_push($ret, $k.'='.$v); 
    14091409        } 
    14101410 
    1411         if ( NULL === $sep ) 
     1411        if ( null === $sep ) 
    14121412                $sep = ini_get('arg_separator.output'); 
    14131413 
    14141414        return implode($sep, $ret); 
  • wp-includes/comment-template.php

     
    769769 * @param int $post_id An optional post ID to check instead of the current post. 
    770770 * @return bool True if the comments are open 
    771771 */ 
    772 function comments_open( $post_id=NULL ) { 
     772function comments_open( $post_id = null ) { 
    773773 
    774774        $_post = get_post($post_id); 
    775775 
     
    786786 * @param int $post_id An optional post ID to check instead of the current post. 
    787787 * @return bool True if pings are accepted 
    788788 */ 
    789 function pings_open( $post_id = NULL ) { 
     789function pings_open( $post_id = null ) { 
    790790 
    791791        $_post = get_post($post_id); 
    792792 
  • wp-includes/shortcodes.php

     
    206206                return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, $m[5], $tag ) . $m[6]; 
    207207        } else { 
    208208                // self-closing tag 
    209                 return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, NULL,  $tag ) . $m[6]; 
     209                return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, null,  $tag ) . $m[6]; 
    210210        } 
    211211} 
    212212 
  • wp-includes/functions.wp-styles.php

     
    4545 * @param string|bool $src Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'. 
    4646 * @param array $deps Array of handles of any stylesheet that this stylesheet depends on. 
    4747 *  (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies. 
    48  * @param string|bool $ver String specifying the stylesheet version number. Set to NULL to disable. 
     48 * @param string|bool $ver String specifying the stylesheet version number. Set to null to disable. 
    4949 *  Used to ensure that the correct version is sent to the client regardless of caching. 
    5050 * @param string $media The media for which this stylesheet has been defined. 
    5151 */ 
  • wp-includes/class-wp-xmlrpc-server.php

     
    30833083                        $name = "wpid{$old_file->ID}-{$filename}"; 
    30843084                } 
    30853085 
    3086                 $upload = wp_upload_bits($name, NULL, $bits); 
     3086                $upload = wp_upload_bits($name, null, $bits); 
    30873087                if ( ! empty($upload['error']) ) { 
    30883088                        $errorString = sprintf(__('Could not write file %1$s (%2$s)'), $name, $upload['error']); 
    30893089                        logIO('O', '(MW) ' . $errorString); 
  • wp-includes/cache.php

     
    422422                if ( empty ($group) ) 
    423423                        $group = 'default'; 
    424424 
    425                 if ( NULL === $data ) 
     425                if ( null === $data ) 
    426426                        $data = ''; 
    427427 
    428428                if ( is_object($data) ) 
  • wp-includes/query.php

     
    29232923                if ( isset($this->queried_object) ) 
    29242924                        return $this->queried_object; 
    29252925 
    2926                 $this->queried_object = NULL; 
     2926                $this->queried_object = null; 
    29272927                $this->queried_object_id = 0; 
    29282928 
    29292929                if ( $this->is_category || $this->is_tag || $this->is_tax ) { 
  • wp-includes/kses.php

     
    937937} 
    938938 
    939939/** 
    940  * Removes any NULL characters in $string. 
     940 * Removes any null characters in $string. 
    941941 * 
    942942 * @since 1.0.0 
    943943 * 
  • wp-admin/includes/plugin.php

     
    863863 * 
    864864 * @return string The resulting page's hook_suffix 
    865865 */ 
    866 function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = NULL ) { 
     866function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) { 
    867867        global $menu, $admin_page_hooks, $_registered_pages, $_parent_pages; 
    868868 
    869869        $menu_slug = plugin_basename( $menu_slug ); 
  • wp-admin/includes/post.php

     
    11931193 * @param int $thumbnail_id ID of the attachment used for thumbnail 
    11941194 * @return string html 
    11951195 */ 
    1196 function _wp_post_thumbnail_html( $thumbnail_id = NULL ) { 
     1196function _wp_post_thumbnail_html( $thumbnail_id = null ) { 
    11971197        global $content_width, $_wp_additional_image_sizes, $post_ID; 
    11981198        $set_thumbnail_link = '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set featured image' ) . '" href="' . esc_url( get_upload_iframe_src('image') ) . '" id="set-post-thumbnail" class="thickbox">%s</a></p>'; 
    11991199        $content = sprintf($set_thumbnail_link, esc_html__( 'Set featured image' )); 
  • wp-admin/includes/template.php

     
    21642164 *                     Defaults to no other attributes. Other attributes can also be provided as a 
    21652165 *                     string such as 'tabindex="1"', though the array format is typically cleaner. 
    21662166 */ 
    2167 function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) { 
     2167function submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) { 
    21682168        echo get_submit_button( $text, $type, $name, $wrap, $other_attributes ); 
    21692169} 
    21702170 
     
    21852185 *                     Defaults to no other attributes. Other attributes can also be provided as a 
    21862186 *                     string such as 'tabindex="1"', though the array format is typically cleaner. 
    21872187 */ 
    2188 function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) { 
     2188function get_submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) { 
    21892189        switch ( $type ) : 
    21902190                case 'primary' : 
    21912191                case 'secondary' : 
     
    21972197                default : 
    21982198                        $class = $type; // Custom cases can just pass in the classes they want to be used 
    21992199        endswitch; 
    2200         $text = ( NULL == $text ) ? __( 'Save Changes' ) : $text; 
     2200        $text = ( null == $text ) ? __( 'Save Changes' ) : $text; 
    22012201 
    22022202        // Default the id attribute to $name unless an id was specifically provided in $other_attributes 
    22032203        $id = $name;