Plugin Directory

Changeset 664352


Ignore:
Timestamp:
02/06/2013 03:47:28 PM (13 years ago)
Author:
Tech-Squawkers
Message:

Better error handling

Location:
wp-cycle-plus-captions/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-cycle-plus-captions/trunk/readme.txt

    r664334 r664352  
    55Requires at least: 3.0
    66Tested up to: 3.4.1
    7 Stable tag: 0.4.1
     7Stable tag: 0.4.2
    88License: GPLv2 or later
    99
     
    107107* Bug Fix
    108108
     109=0.4.2=
     110* Better error handling
     111
    109112==WP-Cycle Changelog ==
    110113
  • wp-cycle-plus-captions/trunk/wp-cycle.php

    r664334 r664352  
    44Plugin URI: http://www.tech-squawkers.com/wp-cycle-plus-captions/
    55Description: Based on WP-Cycle with modifications by Chris Grab and includes changes by Toby Brommerich to get the caption to display properly with each image.
    6 Version: 0.4.1
     6Version: 0.4.2
    77Author: Toby Brommerich
    88Author URI: http://www.tech-squawkers.com/who-is-toby/
     
    172172            $final_image = $image->save( $dest_file );
    173173        }
    174         $resized_url = $upload_dir_url . basename($final_image['file']);
    175         //print_r($final_image);
    176         //  delete the original
    177         unlink($file);
    178         $file = $final_image['path'];
    179         $url = $resized_url;
     174        if ( ! is_wp_error( $final_image ) ) {
     175            $resized_url = $upload_dir_url . basename($final_image['file']);
     176            //print_r($final_image);
     177            //  delete the original
     178            unlink($file);
     179            $file = $final_image['path'];
     180            $url = $resized_url;
     181        }
    180182    }
    181183   
     
    191193            $final_thumbnail = $thumbnail->save( $dest_thumb );
    192194        }
     195        if ( ! is_wp_error( $final_thumbnail ) ) {
    193196            $thumbnail_url = $upload_dir_url . basename($final_thumbnail['file']);
    194197            $thumbnail = $final_thumbnail['path'];
     198        }
    195199    }
    196200   
Note: See TracChangeset for help on using the changeset viewer.