diff --git a/wp-blog-header.php b/wp-blog-header.php index ec842d716f..9491683824 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -1,5 +1,7 @@ $setting)) { error_log("get_settings: Didn't find setting $setting"); } - return $settings->$setting; + else { + return $settings->$setting; + } } function get_alloptions() { diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 01958be048..8ece23dd42 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -129,9 +129,9 @@ function wp_title($sep = '»', $display = true) { } // Send it out - if ($display && $title) { + if ($display && isset($title)) { echo " $sep $title"; - } elseif (!$display && $title) { + } elseif (!$display && isset($title)) { return " $sep $title"; } } @@ -304,7 +304,9 @@ function get_calendar($daylength = 1) { return; } - $w = ''.intval($HTTP_GET_VARS['w']); + if (isset($HTTP_GET_VARS['w'])) { + $w = ''.intval($HTTP_GET_VARS['w']); + } $time_difference = get_settings('time_difference'); // Let's figure out when we are @@ -419,6 +421,7 @@ function get_calendar($daylength = 1) { ); if ($ak_post_titles) { foreach ($ak_post_titles as $ak_post_title) { + $ak_titles_for_day["$ak_post_title->dom"] = ''; if (empty($ak_titles_for_day["$ak_post_title->dom"])) { // first one $ak_titles_for_day["$ak_post_title->dom"] .= htmlspecialchars(stripslashes($ak_post_title->post_title)); } else { @@ -434,7 +437,7 @@ function get_calendar($daylength = 1) { $daysinmonth = intval(date('t', $unixmonth)); for ($day = 1; $day <= $daysinmonth; ++$day) { - if ($newrow) + if (isset($newrow) && $newrow) echo "\n\t\n\t\n\t\t"; $newrow = false; diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 9fb35b39a5..9683308eec 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -20,6 +20,7 @@ var $debug_called; var $vardump_called; var $show_errors = true; + var $querycount; // ================================================================== // DB Constructor - connects to the server and selects a database @@ -44,6 +45,7 @@ $this->select($dbname); + $this->querycount = 0; }