samwilson / phpflickr

A PHP wrapper for the Flickr API, including OAuth.
https://packagist.org/packages/samwilson/phpflickr
GNU General Public License v2.0
39 stars 15 forks source link

Too few arguments to function Samwilson\PhpFlickr\PhotosApi::search() #43

Closed sultan-rex closed 3 years ago

sultan-rex commented 3 years ago

when I send an array argument to photos_search function , it throws this error

Too few arguments to function Samwilson\PhpFlickr\PhotosApi::search(), 0 passed in C:\xampp\htdocs\gallery\vendor\samwilson\phpflickr\src\PhpFlickr.php on line 1376 and exactly 1 expected

For this line

$photos = $flickr->photos_search(array( 'api_key' => 'dfghddfd', 'tags' => 'cars' ));

ZiTAL commented 3 years ago

photos_search is deprecated, use:

$photos = $flickr->photos()->search(array( 'api_key' => 'dfghddfd', 'tags' => 'cars' ));
samwilson commented 3 years ago

It's true that it's deprecated, but it should've kept working anyway. I've just fixed this issue (although, there's no need to use the fix!).