Skip to content

Commit

Permalink
Fix for Issue 4
Browse files Browse the repository at this point in the history
keithmancuso#4

Failed to open stream: No such file or directory

Uses the siteUrl which is already part of the config.
  • Loading branch information
MattWilcox committed May 23, 2016
1 parent 1b3c421 commit 787703e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions imagecolor/services/ImageColorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public function saveColors($image)
$imageColor = new \ColorsOfImage( $image->url );
$colors = $imageColor->getProminentColors();
*/
$image_to_read = $image->url;
$siteUrl = craft()->config->get('siteUrl');
$image_to_read = $siteUrl . $image->url;

$pal = new \GetMostCommonColors();
$pal->image = $image_to_read;
Expand Down Expand Up @@ -79,4 +80,4 @@ public function getColors($image)


}
}
}

0 comments on commit 787703e

Please sign in to comment.