[API] pwg.session.login fails from digikam export plugin #1455

Closed
opened 2026-10-05 00:44:40 +02:00 by adam · 1 comment
Owner

Attempts to login using digikam export plugin fails.
The login actually succeeds but piwigo throws an exception and doesn't respond to the request.
PHP Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, bool given in /var/www/domainname/piwigo/include/ws_protocols/rest_encoder.php:145

Analysis shows login handler returns the bool whereas the function encodeResponse($response) is conditionallly expecting an PwgError object.

I will raise a pull request to fix this.

Attempts to login using digikam export plugin fails. The login actually succeeds but piwigo throws an exception and doesn't respond to the request. ` PHP Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, bool given in /var/www/domainname/piwigo/include/ws_protocols/rest_encoder.php:145` Analysis shows login handler returns the bool whereas the function encodeResponse($response) is conditionallly expecting an PwgError object. I will raise a pull request to fix this. <!-- github-sync-id:1257334429 -->
adam closed this issue 2026-10-05 00:44:40 +02:00
Author
Owner
Pull request created. [https://github.com/Piwigo/Piwigo/pull/1663](url) <!-- github-comment-id:1145799156 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1455