Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #436 from seregazhuk/uploads-fix
Browse files Browse the repository at this point in the history
 Fix for uploads from non-ascii links
  • Loading branch information
seregazhuk authored Dec 29, 2018
2 parents f09128a + 9112543 commit fadae22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Change Log
All notable changes to this project will be documented in this file.

## v5.9.0 - 2018-11-25
## v5.9.0 - 2018-12-29
### Added:
- Support for Reach Pins. You can specify a title when creating/editing a pin.
- Allow to specify a board section when create/edit Pins.
### Fixed:
- Uploads from non-ascii links

## v5.8.2 - 2018-08-17
### Added:
Expand Down
4 changes: 2 additions & 2 deletions src/Api/Providers/Pins.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class Pins extends EntityProvider
*/
public function create($imageUrl, $boardId, $description = '', $link = '', $title = '', $sectionId = null)
{
// Upload image if first argument is not an url
if (!filter_var($imageUrl, FILTER_VALIDATE_URL)) {
// Upload image if first argument is a local file
if (file_exists($imageUrl)) {
$imageUrl = $this->upload($imageUrl);
}

Expand Down

0 comments on commit fadae22

Please sign in to comment.