<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13068] trunk/wp-includes: Fix notices</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13068">13068</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-02-12 20:14:17 +0000 (Fri, 12 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix notices</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesdefaultwidgetsphp">trunk/wp-includes/default-widgets.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesdefaultwidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/default-widgets.php (13067 => 13068)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/default-widgets.php        2010-02-12 17:37:17 UTC (rev 13067)
+++ trunk/wp-includes/default-widgets.php        2010-02-12 20:14:17 UTC (rev 13068)
</span><span class="lines">@@ -472,9 +472,9 @@
</span><span class="cx">         function update( $new_instance, $old_instance ) {
</span><span class="cx">                 $instance = $old_instance;
</span><span class="cx">                 $instance['title'] = strip_tags($new_instance['title']);
</span><del>-                $instance['count'] = $new_instance['count'] ? 1 : 0;
-                $instance['hierarchical'] = $new_instance['hierarchical'] ? 1 : 0;
-                $instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0;
</del><ins>+                $instance['count'] = !empty($new_instance['count']) ? 1 : 0;
+                $instance['hierarchical'] = !empty($new_instance['hierarchical']) ? 1 : 0;
+                $instance['dropdown'] = !empty($new_instance['dropdown']) ? 1 : 0;
</ins><span class="cx"> 
</span><span class="cx">                 return $instance;
</span><span class="cx">         }
</span><span class="lines">@@ -739,7 +739,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function update($new_instance, $old_instance) {
</span><del>-                $testurl = $new_instance['url'] != $old_instance['url'];
</del><ins>+                $testurl = ( isset($new_instance['url']) &amp;&amp; ($new_instance['url'] != $old_instance['url']) );
</ins><span class="cx">                 return wp_widget_rss_process( $new_instance, $testurl );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -939,9 +939,9 @@
</span><span class="cx">                 $items = 10;
</span><span class="cx">         $url           = esc_url_raw(strip_tags( $widget_rss['url'] ));
</span><span class="cx">         $title         = trim(strip_tags( $widget_rss['title'] ));
</span><del>-        $show_summary  = (int) $widget_rss['show_summary'];
-        $show_author   = (int) $widget_rss['show_author'];
-        $show_date     = (int) $widget_rss['show_date'];
</del><ins>+        $show_summary  = isset($widget_rss['show_summary']) ? (int) $widget_rss['show_summary'] : 0;
+        $show_author   = isset($widget_rss['show_author']) ? (int) $widget_rss['show_author'] :0;
+        $show_date     = isset($widget_rss['show_date']) ? (int) $widget_rss['show_date'] : 0;
</ins><span class="cx"> 
</span><span class="cx">         if ( $check_feed ) {
</span><span class="cx">                 $rss = fetch_feed($url);
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (13067 => 13068)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2010-02-12 17:37:17 UTC (rev 13067)
+++ trunk/wp-includes/general-template.php        2010-02-12 20:14:17 UTC (rev 13068)
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">                 $link = '&lt;a href=&quot;' . esc_url( wp_login_url($redirect) ) . '&quot;&gt;' . __('Log in') . '&lt;/a&gt;';
</span><span class="cx">         else
</span><span class="cx">                 $link = '&lt;a href=&quot;' . esc_url( wp_logout_url($redirect) ) . '&quot;&gt;' . __('Log out') . '&lt;/a&gt;';
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( $echo )
</span><span class="cx">                 echo apply_filters('loginout', $link);
</span><span class="cx">         else
</span><span class="lines">@@ -300,7 +300,7 @@
</span><span class="cx">         } else {
</span><span class="cx">                 $link = $before . '&lt;a href=&quot;' . admin_url() . '&quot;&gt;' . __('Site Admin') . '&lt;/a&gt;' . $after;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( $echo )
</span><span class="cx">                 echo apply_filters('register', $link);
</span><span class="cx">         else
</span><span class="lines">@@ -1021,11 +1021,11 @@
</span><span class="cx">         $cache = array();
</span><span class="cx">         $key = md5( $m . $monthnum . $year );
</span><span class="cx">         if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) {
</span><del>-                if ( is_array($cache) &amp;&amp; isset( $cache[ $key ] ) ) {                
</del><ins>+                if ( is_array($cache) &amp;&amp; isset( $cache[ $key ] ) ) {
</ins><span class="cx">                         if ( $echo )
</span><span class="cx">                                 echo apply_filters( 'get_calendar',  $cache[$key] );
</span><span class="cx">                         else
</span><del>-                                return apply_filters( 'get_calendar',  $cache[$key] );        
</del><ins>+                                return apply_filters( 'get_calendar',  $cache[$key] );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1087,7 +1087,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* translators: Calendar caption: 1: month name, 2: 4-digit year */
</span><span class="cx">         $calendar_caption = _x('%1$s %2$s', 'calendar caption');
</span><del>-        $calendar_output .= '&lt;table id=&quot;wp-calendar&quot; summary=&quot;' . esc_attr__('Calendar') . '&quot;&gt;
</del><ins>+        $calendar_output = '&lt;table id=&quot;wp-calendar&quot; summary=&quot;' . esc_attr__('Calendar') . '&quot;&gt;
</ins><span class="cx">         &lt;caption&gt;' . sprintf($calendar_caption, $wp_locale-&gt;get_month($thismonth), date('Y', $unixmonth)) . '&lt;/caption&gt;
</span><span class="cx">         &lt;thead&gt;
</span><span class="cx">         &lt;tr&gt;';
</span><span class="lines">@@ -1103,7 +1103,7 @@
</span><span class="cx">                 $wd = esc_attr($wd);
</span><span class="cx">                 $calendar_output .= &quot;\n\t\t&lt;th scope=\&quot;col\&quot; title=\&quot;$wd\&quot;&gt;$day_name&lt;/th&gt;&quot;;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         $calendar_output .= '
</span><span class="cx">         &lt;/tr&gt;
</span><span class="cx">         &lt;/thead&gt;
</span><span class="lines">@@ -1206,7 +1206,7 @@
</span><span class="cx"> 
</span><span class="cx">         $calendar_output .= &quot;\n\t&lt;/tr&gt;\n\t&lt;/tbody&gt;\n\t&lt;/table&gt;&quot;;
</span><span class="cx"> 
</span><del>-        $cache[ $key ] = $output;
</del><ins>+        $cache[ $key ] = $calendar_output;
</ins><span class="cx">         wp_cache_set( 'get_calendar', $cache, 'calendar' );
</span><span class="cx"> 
</span><span class="cx">         if ( $echo )
</span></span></pre>
</div>
</div>

</body>
</html>