Make WordPress Core


Ignore:
Timestamp:
02/02/2008 06:42:09 PM (19 years ago)
Author:
ryan
Message:

Some notice fixes from Nazgul. fixes #3155

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r6698 r6711  
    8787
    8888        if ( !empty($post->post_password) ) { // if there's a password
    89                 if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) {      // and it doesn't match the cookie
     89                if ( !isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) {       // and it doesn't match the cookie
    9090                        $output = get_the_password_form();
    9191                        return $output;
    … …  
    142142        $output = $post->post_excerpt;
    143143        if ( !empty($post->post_password) ) { // if there's a password
    144                 if ( $_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password ) {  // and it doesn't match the cookie
     144                if ( !isset($_COOKIE['wp-postpass_'.COOKIEHASH]) || $_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password ) {  // and it doesn't match the cookie
    145145                        $output = __('There is no excerpt because this is a protected post.');
    146146                        return $output;
Note: See TracChangeset for help on using the changeset viewer.