Skip to content

Conversation

@arfevrier
Copy link

Hello,
Here a fix when using the librairy to import photo through Flickr2Piwigo. I got the following error when importing photos from my account:

<br />
<b>Fatal error</b>:  Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /config/www/plugins/flickr2piwigo/vendor/samwilson/phpflickr/src/PhotosApi.php:477
Stack trace:
#0 /config/www/plugins/flickr2piwigo/vendor/samwilson/phpflickr/src/PhotosApi.php(477): in_array()
#1 /config/www/plugins/flickr2piwigo/include/ws_functions.inc.php(147): Samwilson\PhpFlickr\PhotosApi-&gt;getSets()
#2 /app/www/public/include/ws_core.inc.php(600): ws_flickr2piwigo_importPhoto()
#3 /app/www/public/include/ws_protocols/rest_handler.php(41): PwgServer-&gt;invoke()
#4 /app/www/public/include/ws_core.inc.php(281): PwgRestRequestHandler-&gt;handleRequest()
#5 /app/www/public/ws.php(22): PwgServer-&gt;run()
#6 {main}
  thrown in <b>/config/www/plugins/flickr2piwigo/vendor/samwilson/phpflickr/src/PhotosApi.php</b> on line <b>477</b><br />

Fix: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /config/www/plugins/flickr2piwigo/vendor/samwilson/phpflickr/src/PhotosApi.php:477
@samwilson
Copy link
Owner

This looks good, thanks! I think getSets() is supposed to be replaced at some point, but this is probably sensible in the meantime. c.f. #14

@arfevrier arfevrier closed this by deleting the head repository Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants