Plugin Directory

Changeset 1021483


Ignore:
Timestamp:
11/07/2014 12:32:57 PM (11 years ago)
Author:
ojredmond
Message:

improved variable initialisation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • advanced-uploader/trunk/upload.php

    r1019552 r1021483  
    5757        global $adv_file_upload_admin_page, $wpdb;
    5858        //get plugin's options
    59         $destinations = get_option('adv_file_upload_destination');
     59        $destinations = get_option('adv_file_upload_destination', array());
    6060        $gallery = get_option('adv_file_upload_gallery');
    6161        $bws = get_option('adv_file_upload_bws');
     
    169169
    170170        echo "var sizes = new Array();\n";
    171                 foreach ( get_intermediate_image_sizes() as $s ) {
     171        $intermediate_sizes = get_intermediate_image_sizes();
     172        if (!is_array($intermediate_sizes)) {
     173            $intermediate_sizes = array();
     174        }
     175        foreach ( $intermediate_sizes as $s ) {
    172176            echo "sizes['" . $s . "'] = new Array();\n";
    173177
Note: See TracChangeset for help on using the changeset viewer.