Skip to content
Snippets Groups Projects
Commit 05fc1446 authored by sleitner's avatar sleitner
Browse files

Cannot pass parameter 1 by reference

parent a32ceb95
No related branches found
Tags 8.x-1.3
No related merge requests found
......@@ -81,9 +81,10 @@ class InstagramFieldFormatter extends FormatterBase {
* Load image from disk or download it from instagram.
*/
private function loadImage($imageid, $url) {
$local_uri = self::THUMBS_DIRECTORY . '/' . $imageid . '.jpg';
$directory = self::THUMBS_DIRECTORY;
$local_uri = $directory . '/' . $imageid . '.jpg';
if (!file_exists($local_uri)) {
file_prepare_directory(self::THUMBS_DIRECTORY, FILE_CREATE_DIRECTORY);
file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
try {
$thumbnail = \Drupal::httpClient()->request('GET', $url);
file_unmanaged_save_data((string) $thumbnail->getBody(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment