WordPress.org

Plugin Directory

Changeset 622959


Ignore:
Timestamp:
11/09/12 12:16:04 (18 months ago)
Author:
dllh
Message:

Posterous Importer: Switch a few continue statements to returns instead, since continue is invalid outside of loop context and can actually cause fatals errors.

Also remove a function that's no longer in use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • posterous-importer/branches/v2api/posterous.php

    r622192 r622959  
    563563            } 
    564564 
    565             continue; 
     565            return; 
    566566        } 
    567567 
     
    571571        if ( is_wp_error( $upload ) ) { 
    572572            printf( "<em>%s</em><br />\n", __( 'Remote file error:' ) . ' ' . htmlspecialchars( $upload->get_error_message() ) ); 
    573             continue; 
     573            return; 
    574574        } else { 
    575575            printf( "<em> (%s)</em><br />\n", size_format( filesize( $upload['file'] ) ) ); 
     
    579579            print __( "Zero length file, deleting..." ) . "<br />\n"; 
    580580            @unlink( $upload['file'] ); 
    581             continue; 
     581            return; 
    582582        } 
    583583 
     
    586586            printf( "<em>%s</em><br />\n", $upload['file'] . __( 'has an invalid file type') ); 
    587587            @unlink( $upload['file'] ); 
    588             continue; 
     588            return; 
    589589        } 
    590590 
     
    767767 
    768768        return $hashtable; 
    769     } 
    770  
    771     function remove_scaling_from_image_url( $url ) { 
    772         $new_url = preg_replace( '!\.scaled\d+\.(jpg|jpeg|gif|png)$!i', '', $url ); 
    773         $new_url = preg_replace( '!getfile\d+\.posterous.com!', 'getfile.posterous.com', $new_url ); 
    774         $this->url_remap[ $url ] = $new_url; 
    775         return $new_url; 
    776769    } 
    777770 
Note: See TracChangeset for help on using the changeset viewer.