Make WordPress Core

Changeset 9714


Ignore:
Timestamp:
11/15/2008 05:56:44 PM (17 years ago)
Author:
ryan
Message:

Notice fixes. Props DD32. see #7509

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-attachment-rows.php

    r9690 r9714  
    2525<?php
    2626if ( have_posts() ) {
    27 $bgcolor = '';
    2827add_filter('the_title','wp_specialchars');
    2928while (have_posts()) : the_post();
     
    201200} else {
    202201?>
    203   <tr style='background-color: <?php echo $bgcolor; ?>'>
     202  <tr>
    204203    <td colspan="8"><?php _e('No posts found.') ?></td>
    205204  </tr>
  • trunk/wp-includes/post.php

    r9699 r9714  
    19001900    }
    19011901
    1902     return get_post($page, $output, $filter);
     1902    $page = get_post($page, $output, $filter);
     1903    return $page;
    19031904}
    19041905
  • trunk/wp-includes/query.php

    r9596 r9714  
    17411741            // added slashes screw with quote grouping when done early, so done later
    17421742            $q['s'] = stripslashes($q['s']);
    1743             if ($q['sentence']) {
     1743            if ( !empty($q['sentence']) ) {
    17441744                $q['search_terms'] = array($q['s']);
    17451745            } else {
    1746                 preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $q[s], $matches);
     1746                preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $q['s'], $matches);
    17471747                $q['search_terms'] = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]);
    17481748            }
    1749             $n = ($q['exact']) ? '' : '%';
     1749            $n = !empty($q['exact']) ? '' : '%';
    17501750            $searchand = '';
    17511751            foreach( (array) $q['search_terms'] as $term) {
     
    17551755            }
    17561756            $term = $wpdb->escape($q['s']);
    1757             if (!$q['sentence'] && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] )
     1757            if (empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] )
    17581758                $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')";
    17591759
  • trunk/wp-includes/rss.php

    r9699 r9714  
    539539    $resp = wp_remote_request($url, array('headers' => $headers, 'timeout' => MAGPIE_FETCH_TIME_OUT));
    540540    if ( is_wp_error($resp) ) {
     541        $error = array_shift($resp->errors);
     542
    541543        $resp = new stdClass;
    542544        $resp->status = 500;
     545        $resp->response_code = 500;
     546        $resp->error = $error[0] . "\n"; //\n = Snoopy compatibility
    543547        return $resp;
    544548    }
    545549    $response = new stdClass;
    546550    $response->status = $resp['response']['code'];
     551    $response->response_code = $resp['response']['code'];
    547552    $response->headers = $resp['headers'];
    548553    $response->results = $resp['body'];
Note: See TracChangeset for help on using the changeset viewer.