Skip to content

Commit

Permalink
Отказ от file_get_contents
Browse files Browse the repository at this point in the history
  • Loading branch information
StacoNiK committed Aug 11, 2017
1 parent 625fbb0 commit 80fb8d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VKApi/Media/BasePhotoUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function getUploadServer($params)

protected function uploadPhoto()
{
$photo = file_get_contents($this->photo_url);
$photo = $this->http->get($this->photo_url);
$rand_name = mt_rand(1, 560234).mt_rand(560234, 760234).mt_rand(760234, 999999).".jpg";
file_put_contents($rand_name, $photo);
if (version_compare(PHP_VERSION, '5.5.0', '<=')) {
Expand Down

1 comment on commit 80fb8d5

@1nSaneRu
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это ошибка, после этого фото не грузятся

Please sign in to comment.