Make WordPress Core

Changeset 28585


Ignore:
Timestamp:
05/27/2014 10:54:54 AM (12 years ago)
Author:
SergeyBiryukov
Message:

Avoid a PHP notice in bundled themes if no images were found.

props nabil_kadimi.
fixes #28361.

Location:
trunk/src/wp-content/themes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/image.php

    r25746 r28585  
    5858                        break;
    5959        }
    60         $k++;
     60
    6161        // If there is more than 1 attachment in a gallery
    6262        if ( count( $attachments ) > 1 ) {
     63                $k++;
    6364                if ( isset( $attachments[ $k ] ) )
    6465                        // get the URL of the next image attachment
  • trunk/src/wp-content/themes/twentyten/loop-attachment.php

    r28463 r28585  
    7272                        break;
    7373        }
    74         $k++;
     74
    7575        // If there is more than 1 image attachment in a gallery
    7676        if ( count( $attachments ) > 1 ) {
     77                $k++;
    7778                if ( isset( $attachments[ $k ] ) )
    7879                        // get the URL of the next image attachment
  • trunk/src/wp-content/themes/twentytwelve/image.php

    r25746 r28585  
    5959endforeach;
    6060
    61 $k++;
    6261// If there is more than 1 attachment in a gallery
    6362if ( count( $attachments ) > 1 ) :
     63        $k++;
    6464        if ( isset( $attachments[ $k ] ) ) :
    6565                // get the URL of the next image attachment
Note: See TracChangeset for help on using the changeset viewer.