Make WordPress Core

Changeset 1235


Ignore:
Timestamp:
05/05/2004 09:29:23 PM (21 years ago)
Author:
saxmatt
Message:

Some E_ALL fixes.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1227 r1235  
    500500           
    501501            // Force subkeys to be array type:
    502             if (!is_array($post_meta_cache[$mpid]))
     502            if (!isset($post_meta_cache[$mpid]) || !is_array($post_meta_cache[$mpid]))
    503503                $post_meta_cache[$mpid] = array();
    504             if (!is_array($post_meta_cache[$mpid][$mkey]))
    505                 $post_meta_cache[$mpid][$mkey] = array();
     504            if (!isset($post_meta_cache[$mpid]["$mkey"]) || !is_array($post_meta_cache[$mpid]["$mkey"]))
     505                $post_meta_cache[$mpid]["$mkey"] = array();
    506506           
    507507            // Add a value to the current pid/key:
  • trunk/wp-includes/functions.php

    r1231 r1235  
    164164    global $user_login, $userdata, $user_level, $user_ID, $user_nickname, $user_email, $user_url, $user_pass_md5, $cookiehash;
    165165    // *** retrieving user's data from cookies and db - no spoofing
    166     $user_login = $_COOKIE['wordpressuser_' . $cookiehash];
     166
     167    if (isset($_COOKIE['wordpressuser_' . $cookiehash]))
     168        $user_login = $_COOKIE['wordpressuser_' . $cookiehash];
    167169    $userdata = get_userdatabylogin($user_login);
    168170    $user_level = $userdata->user_level;
  • trunk/wp-includes/links.php

    r1152 r1235  
    124124    if (get_settings('links_recently_updated_time')) {
    125125        $recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL ".get_settings('links_recently_updated_time')." MINUTE) >= NOW(), 1,0) as recently_updated ";
    126     }
     126    } else {
     127        $recently_updated_test = '';
     128    }
    127129    if ($show_updated) {
    128130        $get_updated = ", UNIX_TIMESTAMP(link_updated) AS link_updated_f ";
     
    168170    }
    169171    foreach ($results as $row) {
     172        if (!isset($row->recently_updated)) $row->recently_updated = false;
    170173        echo($before);
    171174        if ($show_updated && $row->recently_updated) {
     
    534537    $cat_order = ('name' == $order) ? 'cat_name' : 'cat_id';
    535538
    536 
    537     // Fetch the link category data as an array of hashes
     539    if (!isset($direction)) $direction = '';
     540    // Fetch the link category data as an array of hashesa
    538541    $cats = $wpdb->get_results("
    539542        SELECT DISTINCT link_category, cat_name, show_images,
  • trunk/wp-includes/template-functions-category.php

    r1228 r1235  
    265265    }
    266266
     267    $exclusions = '';
    267268    if (!empty($exclude)) {
    268         $exclusions = ''; // initialize for safety
    269269        $excats = preg_split('/[\s,]+/',$exclude);
    270270        if (count($excats)) {
     
    327327   
    328328    foreach ($categories as $category) {
    329         if ((intval($hide_empty) == 0 || $category_posts["$category->cat_ID"] > 0) && (!$children || $category->category_parent == $child_of)) {
     329        if ((intval($hide_empty) == 0 || isset($category_posts["$category->cat_ID"])) && (!$children || $category->category_parent == $child_of)) {
    330330            $num_found++;
    331331            $link = '<a href="'.get_category_link(0, $category->cat_ID, $category->category_nicename).'" ';
     
    396396        $pre = "\t\t<ul class='children'>";
    397397        $post = "\t\t</ul>\n";
    398     }
    399     $thelist=$pre.$thelist.$post;
     398    } else {
     399        $pre = $post = '';
     400    }
     401    $thelist = $pre . $thelist . $post;
    400402    if ($recurse) {
    401403        return $thelist;
  • trunk/wp-includes/template-functions-general.php

    r1203 r1235  
    442442            }
    443443            if (empty($ak_titles_for_day["$ak_post_title->dom"])) { // first one
    444                 $ak_titles_for_day["$ak_post_title->dom"] .= htmlspecialchars(stripslashes($ak_post_title->post_title));
     444                $ak_titles_for_day["$ak_post_title->dom"] = htmlspecialchars(stripslashes($ak_post_title->post_title));
    445445            } else {
    446446                $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . htmlspecialchars(stripslashes($ak_post_title->post_title));
  • trunk/wp-rss2.php

    r1223 r1235  
    11<?php
    2 if (! $feed) {
     2if (!isset($feed)) {
    33    $blog = 1;
    44    $doing_rss = 1;
Note: See TracChangeset for help on using the changeset viewer.