Fix Notice. Mark unreachable code as TODO.

git-svn-id: https://develop.svn.wordpress.org/trunk@8828 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-09-05 23:29:30 +00:00
parent 1a98aec97c
commit cfd1c0ba5c
2 changed files with 6 additions and 4 deletions

View File

@ -79,7 +79,8 @@ if ( is_single() ) {
$post_status_label = _c('Posts|manage posts header'); $post_status_label = _c('Posts|manage posts header');
if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) )
$post_status_label = $post_stati[$_GET['post_status']][1]; $post_status_label = $post_stati[$_GET['post_status']][1];
//if ( $post_listing_pageable && !is_archive() && !is_search() ) //Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php //TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php
//if ( $post_listing_pageable && !is_archive() && !is_search() )
// $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label); // $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
//else //else
$h2_noun = $post_status_label; $h2_noun = $post_status_label;

View File

@ -73,9 +73,10 @@ if ( is_singular() ) {
$post_mime_type_label = _c('Media|manage media header'); $post_mime_type_label = _c('Media|manage media header');
if ( isset($_GET['post_mime_type']) && in_array( $_GET['post_mime_type'], array_keys($post_mime_types) ) ) if ( isset($_GET['post_mime_type']) && in_array( $_GET['post_mime_type'], array_keys($post_mime_types) ) )
$post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1]; $post_mime_type_label = $post_mime_types[$_GET['post_mime_type']][1];
if ( $post_listing_pageable && !is_archive() && !is_search() ) //TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in edit.php
$h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_mime_type_label) : sprintf(__('Latest %s'), $post_mime_type_label); //if ( $post_listing_pageable && !is_archive() && !is_search() )
else // $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_mime_type_label) : sprintf(__('Latest %s'), $post_mime_type_label);
//else
$h2_noun = $post_mime_type_label; $h2_noun = $post_mime_type_label;
// Use $_GET instead of is_ since they can override each other // Use $_GET instead of is_ since they can override each other
$h2_author = ''; $h2_author = '';