Skip to content

Commit

Permalink
Fixing php throwing a warning with extract
Browse files Browse the repository at this point in the history
If the args passed to extract are not an array php throws an error. Added a check to make sure the args are an array before running extract.
  • Loading branch information
chrisrolfe198 committed Nov 19, 2014
1 parent 174f713 commit 95e01c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wpthumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ public function generateCacheFile() {

apply_filters( 'wpthumb_image_pre', $editor, $this->args );

extract( $this->args );
if (is_array($this->args)) extract( $this->args );

// Cropping
if ( $crop && $crop_from_position && $crop_from_position !== array( 'center', 'center' ) ) :
Expand Down

0 comments on commit 95e01c2

Please sign in to comment.