[PHP 8.1] Shotwell cannot upload anymore #1481

Closed
opened 2026-10-05 00:45:36 +02:00 by adam · 3 comments
Owner

I don't know if it is a Piwigo bug, or a Shotwell's Piwigo plugin problem, I've also opened a bug on Shotwell side:
https://bugs.launchpad.net/ubuntu/+source/shotwell/+bug/1982564

Trying to upload photo to Piwigo via Shotwell plugin I got and error like "URL not valid" (I got it in Italian).

Looking at Piwigo side I found this php error:

[22-Jul-2022 11:06:39 Europe/Berlin] PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/piwigo/include/functions_user.inc.php on line 804
[22-Jul-2022 11:06:39 Europe/Berlin] PHP Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, bool given in /var/www/piwigo/include/ws_protocols/rest_encoder.php:145
Stack trace:
#0 /var/www/piwigo/include/ws_core.inc.php(289): PwgRestEncoder->encodeResponse()
#1 /var/www/piwigo/include/ws_protocols/rest_handler.php(42): PwgServer->sendResponse()
#2 /var/www/piwigo/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest()
#3 /var/www/piwigo/ws.php(22): PwgServer->run()
#4 {main}
thrown in /var/www/piwigo/include/ws_protocols/rest_encoder.php on line 145
[22-Jul-2022 11:06:40 Europe/Berlin] PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/piwigo/include/functions_user.inc.php on line 804
[22-Jul-2022 11:06:40 Europe/Berlin] PHP Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, bool given in /var/www/piwigo/include/ws_protocols/rest_encoder.php:145
Stack trace:
#0 /var/www/piwigo/include/ws_core.inc.php(289): PwgRestEncoder->encodeResponse()
#1 /var/www/piwigo/include/ws_protocols/rest_handler.php(42): PwgServer->sendResponse()
#2 /var/www/piwigo/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest()
#3 /var/www/piwigo/ws.php(22): PwgServer->run()
#4 {main}
thrown in /var/www/piwigo/include/ws_protocols/rest_encoder.php on line 145

I think both Shotwell and Piwigo are updated to latest version:

Shotwell: 0.30.14 – “Celle”

Piwigo 12.3.0
Operating System: Linux
PHP: 8.1.2
MySQL: 5.5.5-10.6.7-MariaDB-2ubuntu1.1
Grafic Lib: GD 2.3.0

Thanks

Giulio

I don't know if it is a Piwigo bug, or a Shotwell's Piwigo plugin problem, I've also opened a bug on Shotwell side: https://bugs.launchpad.net/ubuntu/+source/shotwell/+bug/1982564 Trying to upload photo to Piwigo via Shotwell plugin I got and error like "URL not valid" (I got it in Italian). Looking at Piwigo side I found this php error: [22-Jul-2022 11:06:39 Europe/Berlin] PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/piwigo/include/functions_user.inc.php on line 804 [22-Jul-2022 11:06:39 Europe/Berlin] PHP Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, bool given in /var/www/piwigo/include/ws_protocols/rest_encoder.php:145 Stack trace: #0 /var/www/piwigo/include/ws_core.inc.php(289): PwgRestEncoder->encodeResponse() #1 /var/www/piwigo/include/ws_protocols/rest_handler.php(42): PwgServer->sendResponse() #2 /var/www/piwigo/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest() #3 /var/www/piwigo/ws.php(22): PwgServer->run() #4 {main} thrown in /var/www/piwigo/include/ws_protocols/rest_encoder.php on line 145 [22-Jul-2022 11:06:40 Europe/Berlin] PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/piwigo/include/functions_user.inc.php on line 804 [22-Jul-2022 11:06:40 Europe/Berlin] PHP Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, bool given in /var/www/piwigo/include/ws_protocols/rest_encoder.php:145 Stack trace: #0 /var/www/piwigo/include/ws_core.inc.php(289): PwgRestEncoder->encodeResponse() #1 /var/www/piwigo/include/ws_protocols/rest_handler.php(42): PwgServer->sendResponse() #2 /var/www/piwigo/include/ws_core.inc.php(281): PwgRestRequestHandler->handleRequest() #3 /var/www/piwigo/ws.php(22): PwgServer->run() #4 {main} thrown in /var/www/piwigo/include/ws_protocols/rest_encoder.php on line 145 I think both Shotwell and Piwigo are updated to latest version: Shotwell: 0.30.14 – “Celle” Piwigo 12.3.0 Operating System: Linux PHP: 8.1.2 MySQL: 5.5.5-10.6.7-MariaDB-2ubuntu1.1 Grafic Lib: GD 2.3.0 Thanks Giulio <!-- github-sync-id:1314764421 -->
adam closed this issue 2026-10-05 00:45:37 +02:00
Author
Owner

Hi @gcarabetta

Can you make a test with the latest "master" ? the get_class has been fixed.

Hi @gcarabetta Can you make a test with the latest "master" ? the `get_class` has been fixed. <!-- github-comment-id:1192383049 -->
Author
Owner

Ok, with 13.0.0RC1 it works.

Thanks

Ok, with 13.0.0RC1 it works. Thanks <!-- github-comment-id:1192405445 -->
Author
Owner

I think it's more with the upcoming 13RC2, but OK, I mark this issue as fixed :-D

I think it's more with the upcoming 13RC2, but OK, I mark this issue as fixed :-D <!-- github-comment-id:1192406602 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1481